Skip to content

Commit fdacc6c

Browse files
authored
Make filterprocessor available in Agent running in OTel mode (#4708)
* Add filter processor * Regenerate NOTICE * Adding CHANGELOG entry
1 parent a045482 commit fdacc6c

File tree

6 files changed

+253
-4
lines changed

6 files changed

+253
-4
lines changed

NOTICE.txt

+211
Original file line numberDiff line numberDiff line change
@@ -5290,6 +5290,217 @@ Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentele
52905290
limitations under the License.
52915291

52925292

5293+
--------------------------------------------------------------------------------
5294+
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor
5295+
Version: v0.97.0
5296+
Licence type (autodetected): Apache-2.0
5297+
--------------------------------------------------------------------------------
5298+
5299+
Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor@v0.97.0/LICENSE:
5300+
5301+
Apache License
5302+
Version 2.0, January 2004
5303+
http://www.apache.org/licenses/
5304+
5305+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5306+
5307+
1. Definitions.
5308+
5309+
"License" shall mean the terms and conditions for use, reproduction,
5310+
and distribution as defined by Sections 1 through 9 of this document.
5311+
5312+
"Licensor" shall mean the copyright owner or entity authorized by
5313+
the copyright owner that is granting the License.
5314+
5315+
"Legal Entity" shall mean the union of the acting entity and all
5316+
other entities that control, are controlled by, or are under common
5317+
control with that entity. For the purposes of this definition,
5318+
"control" means (i) the power, direct or indirect, to cause the
5319+
direction or management of such entity, whether by contract or
5320+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
5321+
outstanding shares, or (iii) beneficial ownership of such entity.
5322+
5323+
"You" (or "Your") shall mean an individual or Legal Entity
5324+
exercising permissions granted by this License.
5325+
5326+
"Source" form shall mean the preferred form for making modifications,
5327+
including but not limited to software source code, documentation
5328+
source, and configuration files.
5329+
5330+
"Object" form shall mean any form resulting from mechanical
5331+
transformation or translation of a Source form, including but
5332+
not limited to compiled object code, generated documentation,
5333+
and conversions to other media types.
5334+
5335+
"Work" shall mean the work of authorship, whether in Source or
5336+
Object form, made available under the License, as indicated by a
5337+
copyright notice that is included in or attached to the work
5338+
(an example is provided in the Appendix below).
5339+
5340+
"Derivative Works" shall mean any work, whether in Source or Object
5341+
form, that is based on (or derived from) the Work and for which the
5342+
editorial revisions, annotations, elaborations, or other modifications
5343+
represent, as a whole, an original work of authorship. For the purposes
5344+
of this License, Derivative Works shall not include works that remain
5345+
separable from, or merely link (or bind by name) to the interfaces of,
5346+
the Work and Derivative Works thereof.
5347+
5348+
"Contribution" shall mean any work of authorship, including
5349+
the original version of the Work and any modifications or additions
5350+
to that Work or Derivative Works thereof, that is intentionally
5351+
submitted to Licensor for inclusion in the Work by the copyright owner
5352+
or by an individual or Legal Entity authorized to submit on behalf of
5353+
the copyright owner. For the purposes of this definition, "submitted"
5354+
means any form of electronic, verbal, or written communication sent
5355+
to the Licensor or its representatives, including but not limited to
5356+
communication on electronic mailing lists, source code control systems,
5357+
and issue tracking systems that are managed by, or on behalf of, the
5358+
Licensor for the purpose of discussing and improving the Work, but
5359+
excluding communication that is conspicuously marked or otherwise
5360+
designated in writing by the copyright owner as "Not a Contribution."
5361+
5362+
"Contributor" shall mean Licensor and any individual or Legal Entity
5363+
on behalf of whom a Contribution has been received by Licensor and
5364+
subsequently incorporated within the Work.
5365+
5366+
2. Grant of Copyright License. Subject to the terms and conditions of
5367+
this License, each Contributor hereby grants to You a perpetual,
5368+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
5369+
copyright license to reproduce, prepare Derivative Works of,
5370+
publicly display, publicly perform, sublicense, and distribute the
5371+
Work and such Derivative Works in Source or Object form.
5372+
5373+
3. Grant of Patent License. Subject to the terms and conditions of
5374+
this License, each Contributor hereby grants to You a perpetual,
5375+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
5376+
(except as stated in this section) patent license to make, have made,
5377+
use, offer to sell, sell, import, and otherwise transfer the Work,
5378+
where such license applies only to those patent claims licensable
5379+
by such Contributor that are necessarily infringed by their
5380+
Contribution(s) alone or by combination of their Contribution(s)
5381+
with the Work to which such Contribution(s) was submitted. If You
5382+
institute patent litigation against any entity (including a
5383+
cross-claim or counterclaim in a lawsuit) alleging that the Work
5384+
or a Contribution incorporated within the Work constitutes direct
5385+
or contributory patent infringement, then any patent licenses
5386+
granted to You under this License for that Work shall terminate
5387+
as of the date such litigation is filed.
5388+
5389+
4. Redistribution. You may reproduce and distribute copies of the
5390+
Work or Derivative Works thereof in any medium, with or without
5391+
modifications, and in Source or Object form, provided that You
5392+
meet the following conditions:
5393+
5394+
(a) You must give any other recipients of the Work or
5395+
Derivative Works a copy of this License; and
5396+
5397+
(b) You must cause any modified files to carry prominent notices
5398+
stating that You changed the files; and
5399+
5400+
(c) You must retain, in the Source form of any Derivative Works
5401+
that You distribute, all copyright, patent, trademark, and
5402+
attribution notices from the Source form of the Work,
5403+
excluding those notices that do not pertain to any part of
5404+
the Derivative Works; and
5405+
5406+
(d) If the Work includes a "NOTICE" text file as part of its
5407+
distribution, then any Derivative Works that You distribute must
5408+
include a readable copy of the attribution notices contained
5409+
within such NOTICE file, excluding those notices that do not
5410+
pertain to any part of the Derivative Works, in at least one
5411+
of the following places: within a NOTICE text file distributed
5412+
as part of the Derivative Works; within the Source form or
5413+
documentation, if provided along with the Derivative Works; or,
5414+
within a display generated by the Derivative Works, if and
5415+
wherever such third-party notices normally appear. The contents
5416+
of the NOTICE file are for informational purposes only and
5417+
do not modify the License. You may add Your own attribution
5418+
notices within Derivative Works that You distribute, alongside
5419+
or as an addendum to the NOTICE text from the Work, provided
5420+
that such additional attribution notices cannot be construed
5421+
as modifying the License.
5422+
5423+
You may add Your own copyright statement to Your modifications and
5424+
may provide additional or different license terms and conditions
5425+
for use, reproduction, or distribution of Your modifications, or
5426+
for any such Derivative Works as a whole, provided Your use,
5427+
reproduction, and distribution of the Work otherwise complies with
5428+
the conditions stated in this License.
5429+
5430+
5. Submission of Contributions. Unless You explicitly state otherwise,
5431+
any Contribution intentionally submitted for inclusion in the Work
5432+
by You to the Licensor shall be under the terms and conditions of
5433+
this License, without any additional terms or conditions.
5434+
Notwithstanding the above, nothing herein shall supersede or modify
5435+
the terms of any separate license agreement you may have executed
5436+
with Licensor regarding such Contributions.
5437+
5438+
6. Trademarks. This License does not grant permission to use the trade
5439+
names, trademarks, service marks, or product names of the Licensor,
5440+
except as required for reasonable and customary use in describing the
5441+
origin of the Work and reproducing the content of the NOTICE file.
5442+
5443+
7. Disclaimer of Warranty. Unless required by applicable law or
5444+
agreed to in writing, Licensor provides the Work (and each
5445+
Contributor provides its Contributions) on an "AS IS" BASIS,
5446+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
5447+
implied, including, without limitation, any warranties or conditions
5448+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
5449+
PARTICULAR PURPOSE. You are solely responsible for determining the
5450+
appropriateness of using or redistributing the Work and assume any
5451+
risks associated with Your exercise of permissions under this License.
5452+
5453+
8. Limitation of Liability. In no event and under no legal theory,
5454+
whether in tort (including negligence), contract, or otherwise,
5455+
unless required by applicable law (such as deliberate and grossly
5456+
negligent acts) or agreed to in writing, shall any Contributor be
5457+
liable to You for damages, including any direct, indirect, special,
5458+
incidental, or consequential damages of any character arising as a
5459+
result of this License or out of the use or inability to use the
5460+
Work (including but not limited to damages for loss of goodwill,
5461+
work stoppage, computer failure or malfunction, or any and all
5462+
other commercial damages or losses), even if such Contributor
5463+
has been advised of the possibility of such damages.
5464+
5465+
9. Accepting Warranty or Additional Liability. While redistributing
5466+
the Work or Derivative Works thereof, You may choose to offer,
5467+
and charge a fee for, acceptance of support, warranty, indemnity,
5468+
or other liability obligations and/or rights consistent with this
5469+
License. However, in accepting such obligations, You may act only
5470+
on Your own behalf and on Your sole responsibility, not on behalf
5471+
of any other Contributor, and only if You agree to indemnify,
5472+
defend, and hold each Contributor harmless for any liability
5473+
incurred by, or claims asserted against, such Contributor by reason
5474+
of your accepting any such warranty or additional liability.
5475+
5476+
END OF TERMS AND CONDITIONS
5477+
5478+
APPENDIX: How to apply the Apache License to your work.
5479+
5480+
To apply the Apache License to your work, attach the following
5481+
boilerplate notice, with the fields enclosed by brackets "[]"
5482+
replaced with your own identifying information. (Don't include
5483+
the brackets!) The text should be enclosed in the appropriate
5484+
comment syntax for the file format. We also recommend that a
5485+
file or class name and description of purpose be included on the
5486+
same "printed page" as the copyright notice for easier
5487+
identification within third-party archives.
5488+
5489+
Copyright [yyyy] [name of copyright owner]
5490+
5491+
Licensed under the Apache License, Version 2.0 (the "License");
5492+
you may not use this file except in compliance with the License.
5493+
You may obtain a copy of the License at
5494+
5495+
http://www.apache.org/licenses/LICENSE-2.0
5496+
5497+
Unless required by applicable law or agreed to in writing, software
5498+
distributed under the License is distributed on an "AS IS" BASIS,
5499+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5500+
See the License for the specific language governing permissions and
5501+
limitations under the License.
5502+
5503+
52935504
--------------------------------------------------------------------------------
52945505
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor
52955506
Version: v0.97.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Makes the `filterprocessor` available to users running Elastic Agent in `otel` mode.
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
pr: https://github.com/elastic/elastic-agent/pull/4708
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ require (
9090
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.97.0
9191
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.97.0
9292
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.97.0
93+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.97.0
9394
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0
9495
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.97.0
9596
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.97.0

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.97.0 h1:
15531553
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.97.0/go.mod h1:BleH1EFM1PjhKy9geg/FVIsvc/v7hl+FqZlxAnzUHSk=
15541554
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.97.0 h1:CeNd+aJaRCDb3bwNvC75ilP8uFRpWI3oD5rSJgmP7AY=
15551555
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.97.0/go.mod h1:2YXD48xGbLZ2mk5ScmrDYzPXjZb4R+1c2723AWuz5Pw=
1556+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.97.0 h1:IfJ9EkykXHBYdwuvZd0qfFcCHAAOuTEaiIlTRw6R9g4=
1557+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.97.0/go.mod h1:uTs2ukYAG9tCkoUhW39J9bNQAqwpqHhE85eeRVm6zCM=
15561558
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0 h1:Fa3TvB9WKi6wF3N1Kn4oDeyrigAidK+0uQaAvRQUwLQ=
15571559
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0/go.mod h1:XKpJmOEQTVg6CdbWi9n1Gr+MYc3A6DtYX3uuYB7Q4so=
15581560
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.97.0 h1:8UfxoSP0ZKkib+RWZVdCixHEjkz1VxspRAmHqmexO9M=

internal/pkg/otel/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ This section provides a summary of components included in the Elastic Distributi
5454
| Component | Version |
5555
|---|---|
5656
| attributesprocessor | v0.97.0|
57+
| filterprocessor | v0.97.0|
5758
| resourceprocessor | v0.97.0|
5859
| transformprocessor | v0.97.0|
5960
| batchprocessor | v0.97.0|

internal/pkg/otel/components.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ import (
1616

1717
// Processors:
1818
attributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" // for modifying signal attributes
19-
resourceprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" // for modifying resource attributes
20-
transformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" // for OTTL processing on logs
21-
"go.opentelemetry.io/collector/processor/batchprocessor" // for batching events
22-
"go.opentelemetry.io/collector/processor/memorylimiterprocessor" // for putting backpressure when approach a memory limit
19+
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor"
20+
resourceprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" // for modifying resource attributes
21+
transformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" // for OTTL processing on logs
22+
"go.opentelemetry.io/collector/processor/batchprocessor" // for batching events
23+
"go.opentelemetry.io/collector/processor/memorylimiterprocessor" // for putting backpressure when approach a memory limit
2324

2425
// Exporters:
2526
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter"
@@ -48,6 +49,7 @@ func components() (otelcol.Factories, error) {
4849
resourceprocessor.NewFactory(),
4950
attributesprocessor.NewFactory(),
5051
transformprocessor.NewFactory(),
52+
filterprocessor.NewFactory(),
5153
)
5254
if err != nil {
5355
return otelcol.Factories{}, err

0 commit comments

Comments
 (0)