Skip to content

Commit e7f9131

Browse files
mergify[bot]anuraagaandrzej-stencel
authored
[8.18] (backport #8372) otel: add cumulativetodeltaprocessor to EDOT collector (#8386)
* otel: add cumulativetodeltaprocessor to EDOT collector (#8372) --------- Co-authored-by: Andrzej Stencel <[email protected]> (cherry picked from commit 5111970) # Conflicts: # NOTICE-fips.txt # go.mod # go.sum # internal/pkg/otel/README.md # internal/pkg/otel/testdata/all-components-fips.yml * Fix merge * mage notice --------- Co-authored-by: Anuraag (Rag) Agrawal <[email protected]> Co-authored-by: Andrzej Stencel <[email protected]>
1 parent 75159d2 commit e7f9131

File tree

7 files changed

+251
-0
lines changed

7 files changed

+251
-0
lines changed

NOTICE.txt

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6350,6 +6350,217 @@ Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentele
63506350
limitations under the License.
63516351

63526352

6353+
--------------------------------------------------------------------------------
6354+
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor
6355+
Version: v0.120.1
6356+
Licence type (autodetected): Apache-2.0
6357+
--------------------------------------------------------------------------------
6358+
6359+
Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/processor/[email protected]/LICENSE:
6360+
6361+
Apache License
6362+
Version 2.0, January 2004
6363+
http://www.apache.org/licenses/
6364+
6365+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6366+
6367+
1. Definitions.
6368+
6369+
"License" shall mean the terms and conditions for use, reproduction,
6370+
and distribution as defined by Sections 1 through 9 of this document.
6371+
6372+
"Licensor" shall mean the copyright owner or entity authorized by
6373+
the copyright owner that is granting the License.
6374+
6375+
"Legal Entity" shall mean the union of the acting entity and all
6376+
other entities that control, are controlled by, or are under common
6377+
control with that entity. For the purposes of this definition,
6378+
"control" means (i) the power, direct or indirect, to cause the
6379+
direction or management of such entity, whether by contract or
6380+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
6381+
outstanding shares, or (iii) beneficial ownership of such entity.
6382+
6383+
"You" (or "Your") shall mean an individual or Legal Entity
6384+
exercising permissions granted by this License.
6385+
6386+
"Source" form shall mean the preferred form for making modifications,
6387+
including but not limited to software source code, documentation
6388+
source, and configuration files.
6389+
6390+
"Object" form shall mean any form resulting from mechanical
6391+
transformation or translation of a Source form, including but
6392+
not limited to compiled object code, generated documentation,
6393+
and conversions to other media types.
6394+
6395+
"Work" shall mean the work of authorship, whether in Source or
6396+
Object form, made available under the License, as indicated by a
6397+
copyright notice that is included in or attached to the work
6398+
(an example is provided in the Appendix below).
6399+
6400+
"Derivative Works" shall mean any work, whether in Source or Object
6401+
form, that is based on (or derived from) the Work and for which the
6402+
editorial revisions, annotations, elaborations, or other modifications
6403+
represent, as a whole, an original work of authorship. For the purposes
6404+
of this License, Derivative Works shall not include works that remain
6405+
separable from, or merely link (or bind by name) to the interfaces of,
6406+
the Work and Derivative Works thereof.
6407+
6408+
"Contribution" shall mean any work of authorship, including
6409+
the original version of the Work and any modifications or additions
6410+
to that Work or Derivative Works thereof, that is intentionally
6411+
submitted to Licensor for inclusion in the Work by the copyright owner
6412+
or by an individual or Legal Entity authorized to submit on behalf of
6413+
the copyright owner. For the purposes of this definition, "submitted"
6414+
means any form of electronic, verbal, or written communication sent
6415+
to the Licensor or its representatives, including but not limited to
6416+
communication on electronic mailing lists, source code control systems,
6417+
and issue tracking systems that are managed by, or on behalf of, the
6418+
Licensor for the purpose of discussing and improving the Work, but
6419+
excluding communication that is conspicuously marked or otherwise
6420+
designated in writing by the copyright owner as "Not a Contribution."
6421+
6422+
"Contributor" shall mean Licensor and any individual or Legal Entity
6423+
on behalf of whom a Contribution has been received by Licensor and
6424+
subsequently incorporated within the Work.
6425+
6426+
2. Grant of Copyright License. Subject to the terms and conditions of
6427+
this License, each Contributor hereby grants to You a perpetual,
6428+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6429+
copyright license to reproduce, prepare Derivative Works of,
6430+
publicly display, publicly perform, sublicense, and distribute the
6431+
Work and such Derivative Works in Source or Object form.
6432+
6433+
3. Grant of Patent License. Subject to the terms and conditions of
6434+
this License, each Contributor hereby grants to You a perpetual,
6435+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6436+
(except as stated in this section) patent license to make, have made,
6437+
use, offer to sell, sell, import, and otherwise transfer the Work,
6438+
where such license applies only to those patent claims licensable
6439+
by such Contributor that are necessarily infringed by their
6440+
Contribution(s) alone or by combination of their Contribution(s)
6441+
with the Work to which such Contribution(s) was submitted. If You
6442+
institute patent litigation against any entity (including a
6443+
cross-claim or counterclaim in a lawsuit) alleging that the Work
6444+
or a Contribution incorporated within the Work constitutes direct
6445+
or contributory patent infringement, then any patent licenses
6446+
granted to You under this License for that Work shall terminate
6447+
as of the date such litigation is filed.
6448+
6449+
4. Redistribution. You may reproduce and distribute copies of the
6450+
Work or Derivative Works thereof in any medium, with or without
6451+
modifications, and in Source or Object form, provided that You
6452+
meet the following conditions:
6453+
6454+
(a) You must give any other recipients of the Work or
6455+
Derivative Works a copy of this License; and
6456+
6457+
(b) You must cause any modified files to carry prominent notices
6458+
stating that You changed the files; and
6459+
6460+
(c) You must retain, in the Source form of any Derivative Works
6461+
that You distribute, all copyright, patent, trademark, and
6462+
attribution notices from the Source form of the Work,
6463+
excluding those notices that do not pertain to any part of
6464+
the Derivative Works; and
6465+
6466+
(d) If the Work includes a "NOTICE" text file as part of its
6467+
distribution, then any Derivative Works that You distribute must
6468+
include a readable copy of the attribution notices contained
6469+
within such NOTICE file, excluding those notices that do not
6470+
pertain to any part of the Derivative Works, in at least one
6471+
of the following places: within a NOTICE text file distributed
6472+
as part of the Derivative Works; within the Source form or
6473+
documentation, if provided along with the Derivative Works; or,
6474+
within a display generated by the Derivative Works, if and
6475+
wherever such third-party notices normally appear. The contents
6476+
of the NOTICE file are for informational purposes only and
6477+
do not modify the License. You may add Your own attribution
6478+
notices within Derivative Works that You distribute, alongside
6479+
or as an addendum to the NOTICE text from the Work, provided
6480+
that such additional attribution notices cannot be construed
6481+
as modifying the License.
6482+
6483+
You may add Your own copyright statement to Your modifications and
6484+
may provide additional or different license terms and conditions
6485+
for use, reproduction, or distribution of Your modifications, or
6486+
for any such Derivative Works as a whole, provided Your use,
6487+
reproduction, and distribution of the Work otherwise complies with
6488+
the conditions stated in this License.
6489+
6490+
5. Submission of Contributions. Unless You explicitly state otherwise,
6491+
any Contribution intentionally submitted for inclusion in the Work
6492+
by You to the Licensor shall be under the terms and conditions of
6493+
this License, without any additional terms or conditions.
6494+
Notwithstanding the above, nothing herein shall supersede or modify
6495+
the terms of any separate license agreement you may have executed
6496+
with Licensor regarding such Contributions.
6497+
6498+
6. Trademarks. This License does not grant permission to use the trade
6499+
names, trademarks, service marks, or product names of the Licensor,
6500+
except as required for reasonable and customary use in describing the
6501+
origin of the Work and reproducing the content of the NOTICE file.
6502+
6503+
7. Disclaimer of Warranty. Unless required by applicable law or
6504+
agreed to in writing, Licensor provides the Work (and each
6505+
Contributor provides its Contributions) on an "AS IS" BASIS,
6506+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6507+
implied, including, without limitation, any warranties or conditions
6508+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
6509+
PARTICULAR PURPOSE. You are solely responsible for determining the
6510+
appropriateness of using or redistributing the Work and assume any
6511+
risks associated with Your exercise of permissions under this License.
6512+
6513+
8. Limitation of Liability. In no event and under no legal theory,
6514+
whether in tort (including negligence), contract, or otherwise,
6515+
unless required by applicable law (such as deliberate and grossly
6516+
negligent acts) or agreed to in writing, shall any Contributor be
6517+
liable to You for damages, including any direct, indirect, special,
6518+
incidental, or consequential damages of any character arising as a
6519+
result of this License or out of the use or inability to use the
6520+
Work (including but not limited to damages for loss of goodwill,
6521+
work stoppage, computer failure or malfunction, or any and all
6522+
other commercial damages or losses), even if such Contributor
6523+
has been advised of the possibility of such damages.
6524+
6525+
9. Accepting Warranty or Additional Liability. While redistributing
6526+
the Work or Derivative Works thereof, You may choose to offer,
6527+
and charge a fee for, acceptance of support, warranty, indemnity,
6528+
or other liability obligations and/or rights consistent with this
6529+
License. However, in accepting such obligations, You may act only
6530+
on Your own behalf and on Your sole responsibility, not on behalf
6531+
of any other Contributor, and only if You agree to indemnify,
6532+
defend, and hold each Contributor harmless for any liability
6533+
incurred by, or claims asserted against, such Contributor by reason
6534+
of your accepting any such warranty or additional liability.
6535+
6536+
END OF TERMS AND CONDITIONS
6537+
6538+
APPENDIX: How to apply the Apache License to your work.
6539+
6540+
To apply the Apache License to your work, attach the following
6541+
boilerplate notice, with the fields enclosed by brackets "[]"
6542+
replaced with your own identifying information. (Don't include
6543+
the brackets!) The text should be enclosed in the appropriate
6544+
comment syntax for the file format. We also recommend that a
6545+
file or class name and description of purpose be included on the
6546+
same "printed page" as the copyright notice for easier
6547+
identification within third-party archives.
6548+
6549+
Copyright [yyyy] [name of copyright owner]
6550+
6551+
Licensed under the Apache License, Version 2.0 (the "License");
6552+
you may not use this file except in compliance with the License.
6553+
You may obtain a copy of the License at
6554+
6555+
http://www.apache.org/licenses/LICENSE-2.0
6556+
6557+
Unless required by applicable law or agreed to in writing, software
6558+
distributed under the License is distributed on an "AS IS" BASIS,
6559+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6560+
See the License for the specific language governing permissions and
6561+
limitations under the License.
6562+
6563+
63536564
--------------------------------------------------------------------------------
63546565
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor
63556566
Version: v0.120.1
Lines changed: 32 additions & 0 deletions
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: add cumulativetodeltaprocessor to EDOT collector
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/owner/repo/1234
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ require (
109109
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.120.1
110110
github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.120.1
111111
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.120.1
112+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.120.1
112113
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.120.1
113114
github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor v0.120.1
114115
github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.120.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.120.1
12411241
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.120.1/go.mod h1:orTo3L++NkVjtzMb4CggOaBGlLkuVrUb7f7V2Gaj2l0=
12421242
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.120.1 h1:7LY7UihgRu7hJxmZrm2c/tvJP3/2k8jkQuSErEm7HQI=
12431243
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.120.1/go.mod h1:mnMdWqOzMwysJDQAt3YEOma4NgIiLdtGurkjqsIQUh8=
1244+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.120.1 h1:1r5V854XdnFs45HLaYGQhf67VOpI8Z7I/4ykADP7qVY=
1245+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.120.1/go.mod h1:vqQit5yBGCd+REj/S83bIlHSnI4wz+UpnZ+YXyCYql0=
12441246
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.120.1 h1:rfVNYCHomCYDXWv/n/O9sIR9B17aUfdrGjvfFXVGYt0=
12451247
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.120.1/go.mod h1:nev2fW1rLX8JsRMR/FdX9K7B45SihFSi9NNf8hmQj/Q=
12461248
github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor v0.120.1 h1:SBDtMsMZJBvAoSgc1oSPLMa70mh8bzTLUEM9e1I5wsY=

internal/pkg/otel/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ This section provides a summary of components included in the Elastic Distributi
7070
|---|---|
7171
| [attributesprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/attributesprocessor/v0.120.1/processor/attributesprocessor/README.md) | v0.120.1 |
7272
| [batchprocessor](https://github.com/open-telemetry/opentelemetry-collector/blob/processor/batchprocessor/v0.120.0/processor/batchprocessor/README.md) | v0.120.0 |
73+
| [cumulativetodeltaprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/cumulativetodeltaprocessor/v0.120.1/processor/cumulativetodeltaprocessor/README.md) | v0.120.1 |
7374
| [elasticinframetricsprocessor](https://github.com/elastic/opentelemetry-collector-components/blob/processor/elasticinframetricsprocessor/v0.13.0/processor/elasticinframetricsprocessor/README.md) | v0.13.0 |
7475
| [elastictraceprocessor](https://github.com/elastic/opentelemetry-collector-components/blob/processor/elastictraceprocessor/v0.4.1/processor/elastictraceprocessor/README.md) | v0.4.1 |
7576
| [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/filterprocessor/v0.120.1/processor/filterprocessor/README.md) | v0.120.1 |

internal/pkg/otel/components.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030

3131
// Processors:
3232
attributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" // for modifying signal attributes
33+
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor"
3334
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor"
3435
geoipprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor" // for adding geographical metadata associated to an IP address
3536
k8sattributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" // for adding k8s metadata
@@ -101,6 +102,7 @@ func components(extensionFactories ...extension.Factory) func() (otelcol.Factori
101102
batchprocessor.NewFactory(),
102103
resourceprocessor.NewFactory(),
103104
attributesprocessor.NewFactory(),
105+
cumulativetodeltaprocessor.NewFactory(),
104106
transformprocessor.NewFactory(),
105107
filterprocessor.NewFactory(),
106108
geoipprocessor.NewFactory(),

internal/pkg/otel/testdata/all-components.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ processors:
2424
key: key1
2525
value: value1
2626
batch:
27+
cumulativetodelta:
2728
elasticinframetrics:
2829
filter:
2930
resource:
@@ -125,6 +126,7 @@ service:
125126
processors:
126127
- attributes
127128
- batch
129+
- cumulativetodelta
128130
- elasticinframetrics
129131
- filter
130132
- resource

0 commit comments

Comments
 (0)