Skip to content

Commit 6a02d8b

Browse files
authored
Add otelcol shortcut to elastic-agent otel (#4816)
1 parent 6f707b5 commit 6a02d8b

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 otelcol shortuct to elastic-agent otel
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/4816
29+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
30+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
31+
#issue: https://github.com/owner/repo/1234
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
BASEDIR=$(dirname "$0")
4+
5+
exec "$BASEDIR/elastic-agent" otel "$@"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
BASEDIR=$(dirname "$0")
4+
5+
exec "$BASEDIR/elastic-agent" otel "$@"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$workdir = Split-Path $MyInvocation.MyCommand.Path
2+
& "$workdir\elastic-agent" otel $args

dev-tools/packaging/packages.yml

+21
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ shared:
134134
mode: 0755
135135
config_mode: 0644
136136
skip_on_missing: true
137+
138+
- &linux_otel_files
139+
'otelcol':
140+
source: '{{ repo.RootDir }}/dev-tools/packaging/files/linux/otelcol.sh'
141+
mode: 0755
142+
'data/{{.BeatName}}-{{ commit_short }}/otelcol':
143+
source: '{{ repo.RootDir }}/dev-tools/packaging/files/linux/otelcol.sh'
144+
mode: 0755
137145

138146
- &agent_binary_common_files
139147
LICENSE.txt:
@@ -201,6 +209,12 @@ shared:
201209
content: >
202210
{{ agent_package_version }}
203211
mode: 0644
212+
'otelcol':
213+
source: '{{ repo.RootDir }}/dev-tools/packaging/files/darwin/otelcol.sh'
214+
mode: 0755
215+
'data/{{.BeatName}}-{{ commit_short }}/otelcol':
216+
source: '{{ repo.RootDir }}/dev-tools/packaging/files/darwin/otelcol.sh'
217+
mode: 0755
204218
<<: *agent_darwin_app_bundle_files
205219
<<: *agent_binary_common_files
206220

@@ -217,6 +231,7 @@ shared:
217231
files:
218232
<<: *agent_binary_files
219233
<<: *agent_components
234+
<<: *linux_otel_files
220235

221236

222237
- &agent_darwin_binary_spec
@@ -235,6 +250,12 @@ shared:
235250
mode: 0755
236251
config_mode: 0644
237252
skip_on_missing: true
253+
'otelcol.ps1':
254+
source: '{{ repo.RootDir }}/dev-tools/packaging/files/windows/otelcol.ps1'
255+
mode: 0755
256+
'data/{{.BeatName}}-{{ commit_short }}/otelcol.ps1':
257+
source: '{{ repo.RootDir }}/dev-tools/packaging/files/windows/otelcol.ps1'
258+
mode: 0755
238259

239260
- &agent_docker_spec
240261
<<: *agent_binary_spec

0 commit comments

Comments
 (0)