Skip to content

Commit

Permalink
Switch auto instrumentation back to 8.0 runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Nov 13, 2024
1 parent afce0cd commit 32dc1a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions examples/Example.AutoInstrumentation/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG OTEL_VERSION=1.9.0
FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand All @@ -18,7 +18,7 @@ ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/relea
RUN chmod +x otel-dotnet-auto-install.sh
RUN OTEL_DOTNET_AUTO_HOME="/app/otel" sh otel-dotnet-auto-install.sh

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build_example
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build_example
ENV _PROJECT="Example.AutoInstrumentation"
ENV _PROJECTPATH="${_PROJECT}/${_PROJECT}.csproj"
WORKDIR /work
Expand Down Expand Up @@ -66,6 +66,7 @@ ENV OTEL_DOTNET_AUTO_LOG_DIRECTORY=/app/logs
ENV ELASTIC_OTEL_LOG_TARGETS=stdout

ENV OTEL_DOTNET_AUTO_HOME="/app/otel"
ENV OTEL_DOTNET_AUTO_LOGGER="console"
ENV DOTNET_ADDITIONAL_DEPS="/app/otel/AdditionalDeps"
ENV DOTNET_SHARED_STORE="/app/otel/store"
ENV DOTNET_STARTUP_HOOKS="/app/otel/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework> <!-- Can't update to 9.0 yet as the autoinstrumentation store doesn't yet include a net9.0 directory -->
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG OTEL_VERSION=1.9.0
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Elastic.OpenTelemetry.AutoInstrumentation.IntegrationTests;

public class PluginLoaderTests(ExampleApplicationContainer exampleApplicationContainer) : IPartitionFixture<ExampleApplicationContainer>
{

[NotWindowsCiFact]
public async Task ObserveDistributionPluginLoad()
{
Expand All @@ -22,9 +21,7 @@ public async Task ObserveDistributionPluginLoad()
.And.Contain("Elastic Distribution of OpenTelemetry .NET:")
.And.Contain("ElasticOpenTelemetryBuilder initialized")
.And.Contain("Added 'Elastic.OpenTelemetry.Processors.ElasticCompatibilityProcessor'");

}

}

public class NotWindowsCiFact : FactAttribute
Expand Down

0 comments on commit 32dc1a3

Please sign in to comment.