Make instrument.sh capable of directly launching app (#2867)

This commit is contained in:
Paulo Janotti 2023-08-22 16:25:46 -07:00 committed by GitHub
parent 7d932f8dfa
commit 2ecc93aaa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -207,6 +207,12 @@ export OTEL_DOTNET_AUTO_HOME="bin/tracer-home"
. ./instrument.sh
```
The script can also launch the application to be instrumented directly:
```sh
OTEL_DOTNET_AUTO_HOME="bin/tracer-home" ./instrument.sh dotnet MyApp.dll
```
### Using playground application
You can use [the example playground application](../examples/playground)

View File

@ -150,3 +150,5 @@ if [ "$ENABLE_PROFILING" = "true" ]; then
export CORECLR_PROFILER_PATH="$OTEL_DOTNET_AUTO_HOME/$DOTNET_RUNTIME_ID/OpenTelemetry.AutoInstrumentation.Native.$SUFIX"
fi
fi
$@