Skip to content

Commit e2eea75

Browse files
[9.0] (backport #8372) otel: add cumulativetodeltaprocessor to EDOT collector (#8388)
* otel: add cumulativetodeltaprocessor to EDOT collector (#8372) --------- Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co> (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 * Remove non-existing --------- Co-authored-by: Anuraag (Rag) Agrawal <anuraaga@gmail.com>
1 parent c988f8b commit e2eea75

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
@@ -6381,6 +6381,217 @@ Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentele
63816381
limitations under the License.
63826382

63836383

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

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.121.0
12661266
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.121.0/go.mod h1:lpnu0do9iR1ICsb9+bEsABhyhREN92xR3RZVp151NGM=
12671267
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.121.0 h1:/d5mamybZt/HWFUhn9khuHf9aDYO6UFmy56Kz65FD4c=
12681268
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.121.0/go.mod h1:C1b83q4Wf1D2TYaX6jrwJPJsJhOU6igzMhcWqVz1d7c=
1269+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.121.0 h1:8X6Aqe9eRNahMakjr8S1WNk7NKZ2JoenKhX1/GOtNU0=
1270+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.121.0/go.mod h1:WIV0+TyES4azTfZLD3+n0Ml39BF0CgYIxmBTLSMJmPc=
12691271
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.121.0 h1:BopsRgxLIXLNt4vN6XkF5CqStBU8EF1fcE1Pm8EpaXA=
12701272
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.121.0/go.mod h1:cAik9bdnGeSOuuF+yzqa6eIy8DvCU9/VyzB4QDqx5hA=
12711273
github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor v0.121.0 h1:qyavk1103GqgLIdXA6DOCwzugqVhw/CsIeTk4T9SiWQ=

internal/pkg/otel/README.md

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

internal/pkg/otel/components.go

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

3434
// Processors:
3535
attributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" // for modifying signal attributes
36+
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor"
3637
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor"
3738
geoipprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor" // for adding geographical metadata associated to an IP address
3839
k8sattributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" // for adding k8s metadata
@@ -105,6 +106,7 @@ func components(extensionFactories ...extension.Factory) func() (otelcol.Factori
105106
batchprocessor.NewFactory(),
106107
resourceprocessor.NewFactory(),
107108
attributesprocessor.NewFactory(),
109+
cumulativetodeltaprocessor.NewFactory(),
108110
transformprocessor.NewFactory(),
109111
filterprocessor.NewFactory(),
110112
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)