-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add otelcol shortcut to elastic-agent otel
#4816
Merged
Merged
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b5c4db9
Add elastic-otel shortcut for darwin
nchaulet 2387ab1
linux and windows
nchaulet 78e086b
Merge branch 'main' of github.com:elastic/elastic-agent into feature-…
nchaulet 16c821c
fix typo
nchaulet 6f77860
Fix after review and rename otelcol
nchaulet 060205b
add changelog
nchaulet ee019f9
Merge branch 'main' into feature-elastic-otel-cmd
nchaulet 0a1c5c7
Merge branch 'main' into feature-elastic-otel-cmd
nchaulet eff9d9b
Merge branch 'main' of github.com:elastic/elastic-agent into feature-…
nchaulet 75a93d2
fix deleted spec
nchaulet 67e7ced
Merge branch 'feature-elastic-otel-cmd' of github.com:elastic/elastic…
nchaulet aa22b93
fix typo
nchaulet 8905dfd
fix formating
nchaulet 02dfd3b
Merge branch 'main' into feature-elastic-otel-cmd
nchaulet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASEDIR=$(dirname "$0") | ||
|
||
exec $BASEDIR/elastic-agent otel $@ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASEDIR=$(dirname "$0") | ||
|
||
exec $BASEDIR/elastic-agent otel $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$workdir = Split-Path $MyInvocation.MyCommand.Path | ||
& "$workdir\elastic-agent" otel $args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,14 @@ shared: | |
mode: 0755 | ||
config_mode: 0644 | ||
skip_on_missing: true | ||
|
||
- &linux_otel_files | ||
'elastic-otel': | ||
source: '{{ repo.RootDir }}/dev-tools/packaging/files/linux/elastic-otel.sh' | ||
mode: 0755 | ||
'data/{{.BeatName}}-{{ commit_short }}/elastic-otel': | ||
source: '{{ repo.RootDir }}/dev-tools/packaging/files/linux/elastic-otel.sh' | ||
mode: 0755 | ||
|
||
- &agent_binary_common_files | ||
LICENSE.txt: | ||
|
@@ -201,6 +209,12 @@ shared: | |
content: > | ||
{{ agent_package_version }} | ||
mode: 0644 | ||
'elastic-otel': | ||
source: '{{ repo.RootDir }}/dev-tools/packaging/files/darwin/elastic-otel.sh' | ||
mode: 0755 | ||
'data/{{.BeatName}}-{{ commit_short }}/elastic-otel': | ||
source: '{{ repo.RootDir }}/dev-tools/packaging/files/darwin/elastic-otel.sh' | ||
mode: 0755 | ||
<<: *agent_darwin_app_bundle_files | ||
<<: *agent_binary_common_files | ||
|
||
|
@@ -217,6 +231,7 @@ shared: | |
files: | ||
<<: *agent_binary_files | ||
<<: *agent_components | ||
<<: *linux_otel_files | ||
|
||
|
||
- &agent_darwin_binary_spec | ||
|
@@ -235,6 +250,12 @@ shared: | |
mode: 0755 | ||
config_mode: 0644 | ||
skip_on_missing: true | ||
'elastic-otel.ps1': | ||
source: '{{ repo.RootDir }}/dev-tools/packaging/files/windows/elastic-otel.ps1' | ||
mode: 0755 | ||
'data/{{.BeatName}}-{{ commit_short }}/elastic-otel.ps1': | ||
source: '{{ repo.RootDir }}/dev-tools/packaging/files/windows/elastic-otel.ps1' | ||
mode: 0755 | ||
|
||
- &agent_docker_spec | ||
<<: *agent_binary_spec | ||
|
@@ -811,10 +832,7 @@ specs: | |
'data/{{.BeatName}}-{{ commit_short }}/elastic-agent': | ||
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/darwin/elastic-agent.tmpl' | ||
mode: 0755 | ||
'{{.BeatName}}{{.BinaryExt}}': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. intentional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I will re-add this |
||
source: data/{{.BeatName}}-{{ commit_short }}/elastic-agent.app/Contents/MacOS/{{.BeatName}}{{.BinaryExt}} | ||
symlink: true | ||
mode: 0755 | ||
|
||
|
||
- os: linux | ||
types: [tgz] | ||
|
@@ -1005,6 +1023,8 @@ specs: | |
files: | ||
'{{.BeatName}}{{.BinaryExt}}': | ||
source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} | ||
'{{.BeatName}}{{.BinaryExt}}': | ||
source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} | ||
|
||
- os: linux | ||
types: [tgz] | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Darwin and Linux I believe we actually want
If you put elastic-agent into a folder with a space and then cd to root and try to run it, it will fail due to the space without the path being quoted.
In addition I believe $@ needs to be in quotes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, run shellcheck on this and it should find this problem and any other Bash quirks.