Skip to content

Commit

Permalink
Do not produce internal span for parallel function in experimental mi…
Browse files Browse the repository at this point in the history
…nimal instrumentation mode
  • Loading branch information
plengauer authored Apr 12, 2024
1 parent a6f07c9 commit 517205c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.0
4.4.1
6 changes: 5 additions & 1 deletion src/usr/bin/opentelemetry_shell.custom.parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ _otel_inject_parallel_gnu_arguments() {
local in_exec=1
\echo -n "-q $_otel_shell -c '. otel.sh
"
no_quote=1 _otel_escape_arg "otel_observe $arg"
if \[ "$OTEL_SHELL_EXPERIMENTAL_INSTRUMENT_MINIMALLY" = TRUE ]; then
no_quote=1 _otel_escape_arg "$arg"
else
no_quote=1 _otel_escape_arg "otel_observe $arg"
fi
# even if the command is an exported bash function, the instrumentation works properly because the function is exported with expanded aliases
# so really the instrumentation hint is irrelevant as long as the necessary otel functions are declared
elif \[ "$in_exec" -eq 1 ] && \[ "$arg" = ":::${arg#":::"}" ]; then
Expand Down

0 comments on commit 517205c

Please sign in to comment.