Skip to content

Commit 28432c0

Browse files
[8.17] (backport #8372) otel: add cumulativetodeltaprocessor to EDOT collector (#8385)
* 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/components.go # internal/pkg/otel/testdata/all-components-fips.yml * Fix merge * Fix merge more --------- Co-authored-by: Anuraag (Rag) Agrawal <anuraaga@gmail.com>
1 parent 2d2e997 commit 28432c0

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

68166816

6817+
--------------------------------------------------------------------------------
6818+
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor
6819+
Version: v0.119.0
6820+
Licence type (autodetected): Apache-2.0
6821+
--------------------------------------------------------------------------------
6822+
6823+
Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor@v0.119.0/LICENSE:
6824+
6825+
Apache License
6826+
Version 2.0, January 2004
6827+
http://www.apache.org/licenses/
6828+
6829+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6830+
6831+
1. Definitions.
6832+
6833+
"License" shall mean the terms and conditions for use, reproduction,
6834+
and distribution as defined by Sections 1 through 9 of this document.
6835+
6836+
"Licensor" shall mean the copyright owner or entity authorized by
6837+
the copyright owner that is granting the License.
6838+
6839+
"Legal Entity" shall mean the union of the acting entity and all
6840+
other entities that control, are controlled by, or are under common
6841+
control with that entity. For the purposes of this definition,
6842+
"control" means (i) the power, direct or indirect, to cause the
6843+
direction or management of such entity, whether by contract or
6844+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
6845+
outstanding shares, or (iii) beneficial ownership of such entity.
6846+
6847+
"You" (or "Your") shall mean an individual or Legal Entity
6848+
exercising permissions granted by this License.
6849+
6850+
"Source" form shall mean the preferred form for making modifications,
6851+
including but not limited to software source code, documentation
6852+
source, and configuration files.
6853+
6854+
"Object" form shall mean any form resulting from mechanical
6855+
transformation or translation of a Source form, including but
6856+
not limited to compiled object code, generated documentation,
6857+
and conversions to other media types.
6858+
6859+
"Work" shall mean the work of authorship, whether in Source or
6860+
Object form, made available under the License, as indicated by a
6861+
copyright notice that is included in or attached to the work
6862+
(an example is provided in the Appendix below).
6863+
6864+
"Derivative Works" shall mean any work, whether in Source or Object
6865+
form, that is based on (or derived from) the Work and for which the
6866+
editorial revisions, annotations, elaborations, or other modifications
6867+
represent, as a whole, an original work of authorship. For the purposes
6868+
of this License, Derivative Works shall not include works that remain
6869+
separable from, or merely link (or bind by name) to the interfaces of,
6870+
the Work and Derivative Works thereof.
6871+
6872+
"Contribution" shall mean any work of authorship, including
6873+
the original version of the Work and any modifications or additions
6874+
to that Work or Derivative Works thereof, that is intentionally
6875+
submitted to Licensor for inclusion in the Work by the copyright owner
6876+
or by an individual or Legal Entity authorized to submit on behalf of
6877+
the copyright owner. For the purposes of this definition, "submitted"
6878+
means any form of electronic, verbal, or written communication sent
6879+
to the Licensor or its representatives, including but not limited to
6880+
communication on electronic mailing lists, source code control systems,
6881+
and issue tracking systems that are managed by, or on behalf of, the
6882+
Licensor for the purpose of discussing and improving the Work, but
6883+
excluding communication that is conspicuously marked or otherwise
6884+
designated in writing by the copyright owner as "Not a Contribution."
6885+
6886+
"Contributor" shall mean Licensor and any individual or Legal Entity
6887+
on behalf of whom a Contribution has been received by Licensor and
6888+
subsequently incorporated within the Work.
6889+
6890+
2. Grant of Copyright License. Subject to the terms and conditions of
6891+
this License, each Contributor hereby grants to You a perpetual,
6892+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6893+
copyright license to reproduce, prepare Derivative Works of,
6894+
publicly display, publicly perform, sublicense, and distribute the
6895+
Work and such Derivative Works in Source or Object form.
6896+
6897+
3. Grant of Patent License. Subject to the terms and conditions of
6898+
this License, each Contributor hereby grants to You a perpetual,
6899+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6900+
(except as stated in this section) patent license to make, have made,
6901+
use, offer to sell, sell, import, and otherwise transfer the Work,
6902+
where such license applies only to those patent claims licensable
6903+
by such Contributor that are necessarily infringed by their
6904+
Contribution(s) alone or by combination of their Contribution(s)
6905+
with the Work to which such Contribution(s) was submitted. If You
6906+
institute patent litigation against any entity (including a
6907+
cross-claim or counterclaim in a lawsuit) alleging that the Work
6908+
or a Contribution incorporated within the Work constitutes direct
6909+
or contributory patent infringement, then any patent licenses
6910+
granted to You under this License for that Work shall terminate
6911+
as of the date such litigation is filed.
6912+
6913+
4. Redistribution. You may reproduce and distribute copies of the
6914+
Work or Derivative Works thereof in any medium, with or without
6915+
modifications, and in Source or Object form, provided that You
6916+
meet the following conditions:
6917+
6918+
(a) You must give any other recipients of the Work or
6919+
Derivative Works a copy of this License; and
6920+
6921+
(b) You must cause any modified files to carry prominent notices
6922+
stating that You changed the files; and
6923+
6924+
(c) You must retain, in the Source form of any Derivative Works
6925+
that You distribute, all copyright, patent, trademark, and
6926+
attribution notices from the Source form of the Work,
6927+
excluding those notices that do not pertain to any part of
6928+
the Derivative Works; and
6929+
6930+
(d) If the Work includes a "NOTICE" text file as part of its
6931+
distribution, then any Derivative Works that You distribute must
6932+
include a readable copy of the attribution notices contained
6933+
within such NOTICE file, excluding those notices that do not
6934+
pertain to any part of the Derivative Works, in at least one
6935+
of the following places: within a NOTICE text file distributed
6936+
as part of the Derivative Works; within the Source form or
6937+
documentation, if provided along with the Derivative Works; or,
6938+
within a display generated by the Derivative Works, if and
6939+
wherever such third-party notices normally appear. The contents
6940+
of the NOTICE file are for informational purposes only and
6941+
do not modify the License. You may add Your own attribution
6942+
notices within Derivative Works that You distribute, alongside
6943+
or as an addendum to the NOTICE text from the Work, provided
6944+
that such additional attribution notices cannot be construed
6945+
as modifying the License.
6946+
6947+
You may add Your own copyright statement to Your modifications and
6948+
may provide additional or different license terms and conditions
6949+
for use, reproduction, or distribution of Your modifications, or
6950+
for any such Derivative Works as a whole, provided Your use,
6951+
reproduction, and distribution of the Work otherwise complies with
6952+
the conditions stated in this License.
6953+
6954+
5. Submission of Contributions. Unless You explicitly state otherwise,
6955+
any Contribution intentionally submitted for inclusion in the Work
6956+
by You to the Licensor shall be under the terms and conditions of
6957+
this License, without any additional terms or conditions.
6958+
Notwithstanding the above, nothing herein shall supersede or modify
6959+
the terms of any separate license agreement you may have executed
6960+
with Licensor regarding such Contributions.
6961+
6962+
6. Trademarks. This License does not grant permission to use the trade
6963+
names, trademarks, service marks, or product names of the Licensor,
6964+
except as required for reasonable and customary use in describing the
6965+
origin of the Work and reproducing the content of the NOTICE file.
6966+
6967+
7. Disclaimer of Warranty. Unless required by applicable law or
6968+
agreed to in writing, Licensor provides the Work (and each
6969+
Contributor provides its Contributions) on an "AS IS" BASIS,
6970+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6971+
implied, including, without limitation, any warranties or conditions
6972+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
6973+
PARTICULAR PURPOSE. You are solely responsible for determining the
6974+
appropriateness of using or redistributing the Work and assume any
6975+
risks associated with Your exercise of permissions under this License.
6976+
6977+
8. Limitation of Liability. In no event and under no legal theory,
6978+
whether in tort (including negligence), contract, or otherwise,
6979+
unless required by applicable law (such as deliberate and grossly
6980+
negligent acts) or agreed to in writing, shall any Contributor be
6981+
liable to You for damages, including any direct, indirect, special,
6982+
incidental, or consequential damages of any character arising as a
6983+
result of this License or out of the use or inability to use the
6984+
Work (including but not limited to damages for loss of goodwill,
6985+
work stoppage, computer failure or malfunction, or any and all
6986+
other commercial damages or losses), even if such Contributor
6987+
has been advised of the possibility of such damages.
6988+
6989+
9. Accepting Warranty or Additional Liability. While redistributing
6990+
the Work or Derivative Works thereof, You may choose to offer,
6991+
and charge a fee for, acceptance of support, warranty, indemnity,
6992+
or other liability obligations and/or rights consistent with this
6993+
License. However, in accepting such obligations, You may act only
6994+
on Your own behalf and on Your sole responsibility, not on behalf
6995+
of any other Contributor, and only if You agree to indemnify,
6996+
defend, and hold each Contributor harmless for any liability
6997+
incurred by, or claims asserted against, such Contributor by reason
6998+
of your accepting any such warranty or additional liability.
6999+
7000+
END OF TERMS AND CONDITIONS
7001+
7002+
APPENDIX: How to apply the Apache License to your work.
7003+
7004+
To apply the Apache License to your work, attach the following
7005+
boilerplate notice, with the fields enclosed by brackets "[]"
7006+
replaced with your own identifying information. (Don't include
7007+
the brackets!) The text should be enclosed in the appropriate
7008+
comment syntax for the file format. We also recommend that a
7009+
file or class name and description of purpose be included on the
7010+
same "printed page" as the copyright notice for easier
7011+
identification within third-party archives.
7012+
7013+
Copyright [yyyy] [name of copyright owner]
7014+
7015+
Licensed under the Apache License, Version 2.0 (the "License");
7016+
you may not use this file except in compliance with the License.
7017+
You may obtain a copy of the License at
7018+
7019+
http://www.apache.org/licenses/LICENSE-2.0
7020+
7021+
Unless required by applicable law or agreed to in writing, software
7022+
distributed under the License is distributed on an "AS IS" BASIS,
7023+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7024+
See the License for the specific language governing permissions and
7025+
limitations under the License.
7026+
7027+
68177028
--------------------------------------------------------------------------------
68187029
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor
68197030
Version: v0.119.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
@@ -101,6 +101,7 @@ require (
101101
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.119.0
102102
github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.119.0
103103
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.119.0
104+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.119.0
104105
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.119.0
105106
github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.119.0
106107
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.119.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.119.0
11731173
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.119.0/go.mod h1:qAg6wgkUiX8Ue6cLLsZS//d5TvRPmj8j7ieJbtnpHgY=
11741174
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.119.0 h1:gZLcPTznU086eH0iRZ0t1KhCQDPxsV0e4th8yyRNwL8=
11751175
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.119.0/go.mod h1:e5Sb/dOSruRTyykbNZppUXEXeYh3cI+7ks7M3HaaL8M=
1176+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.119.0 h1:Uiw68g/rrLaSy4HiD8o2grBiBUgmkzT+W6QBCeScAXQ=
1177+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.119.0/go.mod h1:Z4+DZ0MHkE6kRMehh7L/f5KzrL12+yTBVpsPikEjAWI=
11761178
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.119.0 h1:uNGKTj6/vy06LuLsjfEQDy7vH7BwmN9TnPOu6xmRuKM=
11771179
github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.119.0/go.mod h1:9l7VBnHj4Z/q318oSKH6exUK52zYMr/V2dfJA/oVI3Y=
11781180
github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.119.0 h1:ZRMmF+QY+OZSZLNRpv7NN2Ib6JSFi469yexeuEyOq5o=

internal/pkg/otel/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ This section provides a summary of components included in the Elastic Distributi
5757
|---|---|
5858
| [attributesprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/attributesprocessor/v0.119.0/processor/attributesprocessor/README.md) | v0.119.0 |
5959
| [batchprocessor](https://github.com/open-telemetry/opentelemetry-collector/blob/processor/batchprocessor/v0.119.0/processor/batchprocessor/README.md) | v0.119.0 |
60+
| [cumulativetodeltaprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/cumulativetodeltaprocessor/v0.119.0/processor/cumulativetodeltaprocessor/README.md) | v0.119.0 |
6061
| [elasticinframetricsprocessor](https://github.com/elastic/opentelemetry-collector-components/blob/processor/elasticinframetricsprocessor/v0.13.0/processor/elasticinframetricsprocessor/README.md) | v0.13.0 |
6162
| [elastictraceprocessor](https://github.com/elastic/opentelemetry-collector-components/blob/processor/elastictraceprocessor/v0.3.0/processor/elastictraceprocessor/README.md) | v0.3.0 |
6263
| [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/filterprocessor/v0.119.0/processor/filterprocessor/README.md) | v0.119.0 |

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
k8sattributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" // for adding k8s metadata
3536
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor"
@@ -91,6 +92,7 @@ func components() (otelcol.Factories, error) {
9192
batchprocessor.NewFactory(),
9293
resourceprocessor.NewFactory(),
9394
attributesprocessor.NewFactory(),
95+
cumulativetodeltaprocessor.NewFactory(),
9496
transformprocessor.NewFactory(),
9597
filterprocessor.NewFactory(),
9698
k8sattributesprocessor.NewFactory(),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ processors:
2323
key: key1
2424
value: value1
2525
batch:
26+
cumulativetodelta:
2627
elasticinframetrics:
2728
filter:
2829
resource:
@@ -155,6 +156,7 @@ service:
155156
processors:
156157
- attributes
157158
- batch
159+
- cumulativetodelta
158160
- elasticinframetrics
159161
- filter
160162
- resource

0 commit comments

Comments
 (0)