Skip to content

Commit 7cfc0ba

Browse files
blakerousemergify[bot]
authored andcommitted
Add support for running EDOT inside of running Elastic Agent (#5767)
(cherry picked from commit b07566b) # Conflicts: # NOTICE.txt # go.mod # go.sum
1 parent 4aa845f commit 7cfc0ba

File tree

79 files changed

+3519
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3519
-787
lines changed

.github/workflows/golangci-lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
go-version-file: .go-version
2626

2727
- name: golangci-lint
28-
uses: golangci/golangci-lint-action@v6
28+
uses: golangci/golangci-lint-action@v6.1.1
2929
with:
3030
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
31-
version: v1.55.2
31+
version: v1.61.0
3232

3333
# Give the job more time to execute.
3434
# Regarding `--whole-files`, the linter is supposed to support linting of changed a patch only but,

NOTICE.txt

+232
Original file line numberDiff line numberDiff line change
@@ -6066,6 +6066,217 @@ Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentele
60666066
limitations under the License.
60676067

60686068

6069+
--------------------------------------------------------------------------------
6070+
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/pkg/status
6071+
Version: v0.113.0
6072+
Licence type (autodetected): Apache-2.0
6073+
--------------------------------------------------------------------------------
6074+
6075+
Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/status@v0.113.0/LICENSE:
6076+
6077+
Apache License
6078+
Version 2.0, January 2004
6079+
http://www.apache.org/licenses/
6080+
6081+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6082+
6083+
1. Definitions.
6084+
6085+
"License" shall mean the terms and conditions for use, reproduction,
6086+
and distribution as defined by Sections 1 through 9 of this document.
6087+
6088+
"Licensor" shall mean the copyright owner or entity authorized by
6089+
the copyright owner that is granting the License.
6090+
6091+
"Legal Entity" shall mean the union of the acting entity and all
6092+
other entities that control, are controlled by, or are under common
6093+
control with that entity. For the purposes of this definition,
6094+
"control" means (i) the power, direct or indirect, to cause the
6095+
direction or management of such entity, whether by contract or
6096+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
6097+
outstanding shares, or (iii) beneficial ownership of such entity.
6098+
6099+
"You" (or "Your") shall mean an individual or Legal Entity
6100+
exercising permissions granted by this License.
6101+
6102+
"Source" form shall mean the preferred form for making modifications,
6103+
including but not limited to software source code, documentation
6104+
source, and configuration files.
6105+
6106+
"Object" form shall mean any form resulting from mechanical
6107+
transformation or translation of a Source form, including but
6108+
not limited to compiled object code, generated documentation,
6109+
and conversions to other media types.
6110+
6111+
"Work" shall mean the work of authorship, whether in Source or
6112+
Object form, made available under the License, as indicated by a
6113+
copyright notice that is included in or attached to the work
6114+
(an example is provided in the Appendix below).
6115+
6116+
"Derivative Works" shall mean any work, whether in Source or Object
6117+
form, that is based on (or derived from) the Work and for which the
6118+
editorial revisions, annotations, elaborations, or other modifications
6119+
represent, as a whole, an original work of authorship. For the purposes
6120+
of this License, Derivative Works shall not include works that remain
6121+
separable from, or merely link (or bind by name) to the interfaces of,
6122+
the Work and Derivative Works thereof.
6123+
6124+
"Contribution" shall mean any work of authorship, including
6125+
the original version of the Work and any modifications or additions
6126+
to that Work or Derivative Works thereof, that is intentionally
6127+
submitted to Licensor for inclusion in the Work by the copyright owner
6128+
or by an individual or Legal Entity authorized to submit on behalf of
6129+
the copyright owner. For the purposes of this definition, "submitted"
6130+
means any form of electronic, verbal, or written communication sent
6131+
to the Licensor or its representatives, including but not limited to
6132+
communication on electronic mailing lists, source code control systems,
6133+
and issue tracking systems that are managed by, or on behalf of, the
6134+
Licensor for the purpose of discussing and improving the Work, but
6135+
excluding communication that is conspicuously marked or otherwise
6136+
designated in writing by the copyright owner as "Not a Contribution."
6137+
6138+
"Contributor" shall mean Licensor and any individual or Legal Entity
6139+
on behalf of whom a Contribution has been received by Licensor and
6140+
subsequently incorporated within the Work.
6141+
6142+
2. Grant of Copyright License. Subject to the terms and conditions of
6143+
this License, each Contributor hereby grants to You a perpetual,
6144+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6145+
copyright license to reproduce, prepare Derivative Works of,
6146+
publicly display, publicly perform, sublicense, and distribute the
6147+
Work and such Derivative Works in Source or Object form.
6148+
6149+
3. Grant of Patent License. Subject to the terms and conditions of
6150+
this License, each Contributor hereby grants to You a perpetual,
6151+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6152+
(except as stated in this section) patent license to make, have made,
6153+
use, offer to sell, sell, import, and otherwise transfer the Work,
6154+
where such license applies only to those patent claims licensable
6155+
by such Contributor that are necessarily infringed by their
6156+
Contribution(s) alone or by combination of their Contribution(s)
6157+
with the Work to which such Contribution(s) was submitted. If You
6158+
institute patent litigation against any entity (including a
6159+
cross-claim or counterclaim in a lawsuit) alleging that the Work
6160+
or a Contribution incorporated within the Work constitutes direct
6161+
or contributory patent infringement, then any patent licenses
6162+
granted to You under this License for that Work shall terminate
6163+
as of the date such litigation is filed.
6164+
6165+
4. Redistribution. You may reproduce and distribute copies of the
6166+
Work or Derivative Works thereof in any medium, with or without
6167+
modifications, and in Source or Object form, provided that You
6168+
meet the following conditions:
6169+
6170+
(a) You must give any other recipients of the Work or
6171+
Derivative Works a copy of this License; and
6172+
6173+
(b) You must cause any modified files to carry prominent notices
6174+
stating that You changed the files; and
6175+
6176+
(c) You must retain, in the Source form of any Derivative Works
6177+
that You distribute, all copyright, patent, trademark, and
6178+
attribution notices from the Source form of the Work,
6179+
excluding those notices that do not pertain to any part of
6180+
the Derivative Works; and
6181+
6182+
(d) If the Work includes a "NOTICE" text file as part of its
6183+
distribution, then any Derivative Works that You distribute must
6184+
include a readable copy of the attribution notices contained
6185+
within such NOTICE file, excluding those notices that do not
6186+
pertain to any part of the Derivative Works, in at least one
6187+
of the following places: within a NOTICE text file distributed
6188+
as part of the Derivative Works; within the Source form or
6189+
documentation, if provided along with the Derivative Works; or,
6190+
within a display generated by the Derivative Works, if and
6191+
wherever such third-party notices normally appear. The contents
6192+
of the NOTICE file are for informational purposes only and
6193+
do not modify the License. You may add Your own attribution
6194+
notices within Derivative Works that You distribute, alongside
6195+
or as an addendum to the NOTICE text from the Work, provided
6196+
that such additional attribution notices cannot be construed
6197+
as modifying the License.
6198+
6199+
You may add Your own copyright statement to Your modifications and
6200+
may provide additional or different license terms and conditions
6201+
for use, reproduction, or distribution of Your modifications, or
6202+
for any such Derivative Works as a whole, provided Your use,
6203+
reproduction, and distribution of the Work otherwise complies with
6204+
the conditions stated in this License.
6205+
6206+
5. Submission of Contributions. Unless You explicitly state otherwise,
6207+
any Contribution intentionally submitted for inclusion in the Work
6208+
by You to the Licensor shall be under the terms and conditions of
6209+
this License, without any additional terms or conditions.
6210+
Notwithstanding the above, nothing herein shall supersede or modify
6211+
the terms of any separate license agreement you may have executed
6212+
with Licensor regarding such Contributions.
6213+
6214+
6. Trademarks. This License does not grant permission to use the trade
6215+
names, trademarks, service marks, or product names of the Licensor,
6216+
except as required for reasonable and customary use in describing the
6217+
origin of the Work and reproducing the content of the NOTICE file.
6218+
6219+
7. Disclaimer of Warranty. Unless required by applicable law or
6220+
agreed to in writing, Licensor provides the Work (and each
6221+
Contributor provides its Contributions) on an "AS IS" BASIS,
6222+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6223+
implied, including, without limitation, any warranties or conditions
6224+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
6225+
PARTICULAR PURPOSE. You are solely responsible for determining the
6226+
appropriateness of using or redistributing the Work and assume any
6227+
risks associated with Your exercise of permissions under this License.
6228+
6229+
8. Limitation of Liability. In no event and under no legal theory,
6230+
whether in tort (including negligence), contract, or otherwise,
6231+
unless required by applicable law (such as deliberate and grossly
6232+
negligent acts) or agreed to in writing, shall any Contributor be
6233+
liable to You for damages, including any direct, indirect, special,
6234+
incidental, or consequential damages of any character arising as a
6235+
result of this License or out of the use or inability to use the
6236+
Work (including but not limited to damages for loss of goodwill,
6237+
work stoppage, computer failure or malfunction, or any and all
6238+
other commercial damages or losses), even if such Contributor
6239+
has been advised of the possibility of such damages.
6240+
6241+
9. Accepting Warranty or Additional Liability. While redistributing
6242+
the Work or Derivative Works thereof, You may choose to offer,
6243+
and charge a fee for, acceptance of support, warranty, indemnity,
6244+
or other liability obligations and/or rights consistent with this
6245+
License. However, in accepting such obligations, You may act only
6246+
on Your own behalf and on Your sole responsibility, not on behalf
6247+
of any other Contributor, and only if You agree to indemnify,
6248+
defend, and hold each Contributor harmless for any liability
6249+
incurred by, or claims asserted against, such Contributor by reason
6250+
of your accepting any such warranty or additional liability.
6251+
6252+
END OF TERMS AND CONDITIONS
6253+
6254+
APPENDIX: How to apply the Apache License to your work.
6255+
6256+
To apply the Apache License to your work, attach the following
6257+
boilerplate notice, with the fields enclosed by brackets "[]"
6258+
replaced with your own identifying information. (Don't include
6259+
the brackets!) The text should be enclosed in the appropriate
6260+
comment syntax for the file format. We also recommend that a
6261+
file or class name and description of purpose be included on the
6262+
same "printed page" as the copyright notice for easier
6263+
identification within third-party archives.
6264+
6265+
Copyright [yyyy] [name of copyright owner]
6266+
6267+
Licensed under the Apache License, Version 2.0 (the "License");
6268+
you may not use this file except in compliance with the License.
6269+
You may obtain a copy of the License at
6270+
6271+
http://www.apache.org/licenses/LICENSE-2.0
6272+
6273+
Unless required by applicable law or agreed to in writing, software
6274+
distributed under the License is distributed on an "AS IS" BASIS,
6275+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6276+
See the License for the specific language governing permissions and
6277+
limitations under the License.
6278+
6279+
60696280
--------------------------------------------------------------------------------
60706281
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor
60716282
Version: v0.112.0
@@ -11195,12 +11406,21 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/comp
1119511406

1119611407

1119711408
--------------------------------------------------------------------------------
11409+
<<<<<<< HEAD
1119811410
Dependency : go.opentelemetry.io/collector/confmap
1119911411
Version: v1.18.0
1120011412
Licence type (autodetected): Apache-2.0
1120111413
--------------------------------------------------------------------------------
1120211414

1120311415
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/confmap@v1.18.0/LICENSE:
11416+
=======
11417+
Dependency : go.opentelemetry.io/collector/component/componentstatus
11418+
Version: v0.113.0
11419+
Licence type (autodetected): Apache-2.0
11420+
--------------------------------------------------------------------------------
11421+
11422+
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/component/componentstatus@v0.113.0/LICENSE:
11423+
>>>>>>> b07566b96a (Add support for running EDOT inside of running Elastic Agent (#5767))
1120411424

1120511425

1120611426
Apache License
@@ -11407,12 +11627,21 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/conf
1140711627

1140811628

1140911629
--------------------------------------------------------------------------------
11630+
<<<<<<< HEAD
1141011631
Dependency : go.opentelemetry.io/collector/confmap/converter/expandconverter
1141111632
Version: v0.112.0
1141211633
Licence type (autodetected): Apache-2.0
1141311634
--------------------------------------------------------------------------------
1141411635

1141511636
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/confmap/converter/expandconverter@v0.112.0/LICENSE:
11637+
=======
11638+
Dependency : go.opentelemetry.io/collector/confmap
11639+
Version: v1.19.0
11640+
Licence type (autodetected): Apache-2.0
11641+
--------------------------------------------------------------------------------
11642+
11643+
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/confmap@v1.19.0/LICENSE:
11644+
>>>>>>> b07566b96a (Add support for running EDOT inside of running Elastic Agent (#5767))
1141611645

1141711646

1141811647
Apache License
@@ -79492,6 +79721,7 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/clie
7949279721

7949379722

7949479723
--------------------------------------------------------------------------------
79724+
<<<<<<< HEAD
7949579725
Dependency : go.opentelemetry.io/collector/component/componentstatus
7949679726
Version: v0.112.0
7949779727
Licence type (autodetected): Apache-2.0
@@ -79704,6 +79934,8 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/comp
7970479934

7970579935

7970679936
--------------------------------------------------------------------------------
79937+
=======
79938+
>>>>>>> b07566b96a (Add support for running EDOT inside of running Elastic Agent (#5767))
7970779939
Dependency : go.opentelemetry.io/collector/config/configauth
7970879940
Version: v0.112.0
7970979941
Licence type (autodetected): Apache-2.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: Add ability to run Elastic Distribution of OTel Collector at the same time as other inputs
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/5767
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

control_v2.proto

+27
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ enum State {
2323
ROLLBACK = 8;
2424
}
2525

26+
// CollectorComponentStatus used for OTel collector components.
27+
enum CollectorComponentStatus {
28+
StatusNone = 0;
29+
StatusStarting = 1;
30+
StatusOK = 2;
31+
StatusRecoverableError = 3;
32+
StatusPermanentError = 4;
33+
StatusFatalError = 5;
34+
StatusStopping = 6;
35+
StatusStopped = 7;
36+
}
37+
2638
// Unit Type running inside a component.
2739
enum UnitType {
2840
INPUT = 0;
@@ -173,6 +185,18 @@ message StateAgentInfo {
173185
bool isManaged = 8;
174186
}
175187

188+
// CollectorComponent is the status of an OTel collector component.
189+
message CollectorComponent {
190+
// Status of the component.
191+
CollectorComponentStatus status = 1;
192+
// Error is set to the reported error.
193+
string error = 2;
194+
// Timestamp of status.
195+
string timestamp = 3;
196+
// Status information for sub-components of this component.
197+
map<string, CollectorComponent> ComponentStatusMap = 4;
198+
}
199+
176200
// StateResponse is the current state of Elastic Agent.
177201
// Next unused id: 8
178202
message StateResponse {
@@ -194,6 +218,9 @@ message StateResponse {
194218

195219
// Upgrade details
196220
UpgradeDetails upgrade_details = 7;
221+
222+
// OTel collector component status information.
223+
CollectorComponent collector = 8;
197224
}
198225

199226
// UpgradeDetails captures the details of an ongoing Agent upgrade.

0 commit comments

Comments
 (0)