feat: add .NET auto-instrumentation script

This commit is contained in:
2026-02-06 19:18:49 -03:00
parent 6038e82b22
commit 0cd8b96cd0
3 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
# Download OpenTelemetry .NET auto-instrumentation
RUN apt-get update && apt-get install -y curl unzip && \
curl -sSL https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v1.7.0/opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip -o /tmp/otel.zip && \
unzip /tmp/otel.zip -d /opt/otel-dotnet && \
rm /tmp/otel.zip && \
chmod -R 755 /opt/otel-dotnet
# Create volume for sharing instrumentation files
VOLUME /otel-dotnet
CMD ["cp", "-r", "/opt/otel-dotnet/.", "/otel-dotnet/"]