Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h

### Changed

- otel-dotnet-auto-install.sh can optionally use wget instead of curl, useful on
mcr.microsoft.com/dotnet/runtime alpine images.
- Enhanced Kafka and RabbitMQ instrumentation now create spans at the start instead
of manual start time adjustments.

Expand Down
11 changes: 10 additions & 1 deletion script-templates/otel-dotnet-auto-install.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ case "$ARCHITECTURE" in
;;
esac

if command -v curl > /dev/null 2>&1; then
DOWNLOADER="curl -sSfLo"
elif command -v wget > /dev/null 2>&1; then
DOWNLOADER="wget -qO"
else
echo "Error: Neither curl nor wget is available." >&2
exit 1
fi

test -z "$OTEL_DOTNET_AUTO_HOME" && OTEL_DOTNET_AUTO_HOME="$HOME/.otel-dotnet-auto"
test -z "$VERSION" && VERSION="v{{VERSION}}"

Expand All @@ -64,7 +73,7 @@ if [ ! -f "${LOCAL_PATH}" ]; then
(
cd "$DOWNLOAD_DIR"
echo "Downloading $VERSION for $OS_TYPE ($LOCAL_PATH)..."
curl -sSfLo "$LOCAL_PATH" "$RELEASES_URL/download/$VERSION/$ARCHIVE"
${DOWNLOADER} "$LOCAL_PATH" "$RELEASES_URL/download/$VERSION/$ARCHIVE"
)
else
echo "Using local installation archive: $LOCAL_PATH"
Expand Down
Loading