Skip to content

Commit

Permalink
Replace OTel AutoInstrumentation .NET with Splunk OTel .NET (#129)
Browse files Browse the repository at this point in the history
* Bump splunk-otel-collector to 0.62.0

* update dependencies for dotnet manual instrumentation

* update dependencies for dotnet automatic instrumentation

* Replace OTel AutoInstrumentation .NET by Splunk OTel .NET

* bump splunk-otel-collector for signalfx .NET
  • Loading branch information
Kielek authored Oct 28, 2022
1 parent 80baafc commit 1134788
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion opentelemetry-tracing/opentelemetry-dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Manual instrumentation requires adding and initializing the
[OpenTelemetry .NET SDK](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/README.md).
Follow the links below for examples of these two instrumentation modes:

- [Automatic](./automatic/README.md) currently in beta.
- [Automatic](./automatic/README.md) currently in alpha.
- [Manual](./manual/README.md) stable.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OpenTelemetry .NET automatic instrumentation examples
# Splunk Distribution of OpenTelemetry .NET examples

This folder contains sample applications that are instrumented using
[OpenTelemetry .NET Automatic Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation#opentelemetry-net-automatic-instrumentation).
[Splunk Distribution of OpenTelemetry .NET](https://github.com/signalfx/splunk-otel-dotnet).

## Libraries and Framework Examples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
ARG SOURCE_CONTAINER
FROM ${SOURCE_CONTAINER}

# Add the OpenTelemetry .NET Automatic Instrumentation
ARG OTEL_DOTNET_AUTO_VERSION=v0.3.0-beta.1
ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/${OTEL_DOTNET_AUTO_VERSION}/opentelemetry-dotnet-instrumentation-linux-glibc.zip ./opentelemetry-dotnet-autoinstrumentation.zip
# Add the Splunk Distribution of OpenTelemetry .NET
ARG SPLUNK_OTEL_DOTNET_VERSION=v0.0.1-alpha.2
ADD https://github.com/signalfx/splunk-otel-dotnet/releases/download/${SPLUNK_OTEL_DOTNET_VERSION}/splunk-opentelemetry-dotnet-linux-glibc.zip ./splunk-otel-dotnet.zip

RUN apt update
RUN apt -y install zip

ARG INSTALL_DIR=/opt/opentelemetry/dotnet/autoinstrumentation
ARG INSTALL_DIR=/opt/splunk/otel/dotnet
RUN mkdir -p ${INSTALL_DIR}
RUN unzip opentelemetry-dotnet-autoinstrumentation.zip -d ${INSTALL_DIR}
RUN rm opentelemetry-dotnet-autoinstrumentation.zip
RUN unzip splunk-otel-dotnet.zip -d ${INSTALL_DIR}
RUN rm splunk-otel-dotnet.zip
RUN mkdir -p /var/log/opentelemetry/dotnet

ENV CORECLR_ENABLE_PROFILING=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ASP.NET Core and MongoDB Auto-Instrumentation Example

In this example, distributed traces are produced automatically using the
[OpenTelemetry .NET Automatic Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation#opentelemetry-net-automatic-instrumentation).
[Splunk Distribution of OpenTelemetry .NET](https://github.com/signalfx/splunk-otel-dotnet#splunk-distribution-of-opentelemetry-net).
Look at the
[HttpClient](../../../../shared/applications/dotnet/aspnetcore-and-mongodb/src/ClientExample/Program.cs)
and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
aspnetcore:
image: otel-dotnet-auto-aspnetcore-and-mongodb/server-app
image: splunk-otel-dotnet-aspnetcore-and-mongodb/server-app
build:
context: InstrumentContainer
args:
Expand All @@ -10,25 +10,23 @@ services:
- "5000:5000"
environment:
- OTEL_SERVICE_NAME=asp.net-core
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=otel-dotnet-auto-tracing-examples,service.version=1.0.0
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=splunk-otel-dotnet-tracing-examples,service.version=1.0.0
- OTEL_EXPORTER_OTLP_ENDPOINT=http://splunk-otel-collector:4318
- OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS=AspNet,HttpClient,MongoDB
depends_on:
- client
- mongo
- splunk-otel-collector
user: 'root'
client:
image: otel-dotnet-auto-aspnetcore-and-mongodb/client-app
image: splunk-otel-dotnet-aspnetcore-and-mongodb/client-app
build:
context: InstrumentContainer
args:
- SOURCE_CONTAINER=aspnetcore-and-mongodb-client-app
environment:
- OTEL_SERVICE_NAME=example-client
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=otel-dotnet-auto-tracing-examples,service.version=1.0.0
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=splunk-otel-dotnet-tracing-examples,service.version=1.0.0
- OTEL_EXPORTER_OTLP_ENDPOINT=http://splunk-otel-collector:4318
- OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS=HttpClient
depends_on:
- splunk-otel-collector
user: 'root'
Expand All @@ -40,7 +38,7 @@ services:
ports:
- "27017:27017"
splunk-otel-collector:
image: quay.io/signalfx/splunk-otel-collector:0.52.1
image: quay.io/signalfx/splunk-otel-collector:0.62.0
environment:
# Provide the values below if you want to submit the data to the APM ingest.
- SPLUNK_ACCESS_TOKEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
ports:
- "27017:27017"
splunk-otel-collector:
image: quay.io/signalfx/splunk-otel-collector:0.52.1
image: quay.io/signalfx/splunk-otel-collector:0.62.0
environment:
# Provide the values below if you want to submit the data to the APM ingest.
- SPLUNK_ACCESS_TOKEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="MongoDB.Driver" Version="2.9.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" />
<PackageReference Include="MongoDB.Driver" Version="2.18.0" />
<PackageReference Include="MongoDB.Driver.Core.Extensions.OpenTelemetry" Version="1.0.0" />
<PackageReference Include="OpenTelemetry" Version="1.3.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.3.0" />
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.3.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc9.4" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9.4" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="OpenTelemetry" Version="1.3.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.3.0" />
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.3.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc9.4" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="MongoDB.Driver" Version="2.9.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" />
<PackageReference Include="MongoDB.Driver" Version="2.18.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- Adding "Microsoft.Extensions.Logging.Abstractions" is a workaround to instument the client app -->
<!-- with the OpenTelelemetry .NET AutoInstrumentation v0.1.0-beta.1 / this should be removed when -->
<!-- the auto instrumentation version is updated. -->
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
ports:
- "27017:27017"
splunk-otel-collector:
image: quay.io/signalfx/splunk-otel-collector:0.52.1
image: quay.io/signalfx/splunk-otel-collector:0.62.0
environment:
# Provide the values below if you want to submit the data to the APM ingest.
- SPLUNK_ACCESS_TOKEN
Expand Down

0 comments on commit 1134788

Please sign in to comment.