Skip to content

Commit

Permalink
Bump OTel .NET Auto to 1.8.0 (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek authored Sep 30, 2024
1 parent d7fa66b commit b59486b
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h

## [Unreleased](https://github.com/signalfx/splunk-otel-dotnet/compare/v1.6.0...HEAD)

This release is built on top of [OpenTelemetry .NET Auto Instrumentation v1.8.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.8.0).

### Added

### Changed

- Updated [OpenTelemetry .NET Auto Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation):
[`1.8.0`](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.8.0).

### Deprecated

### Removed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Splunk Distribution of OpenTelemetry .NET

[![OpenTelemetry .NET](https://img.shields.io/badge/OTel-1.9.0-blueviolet)](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.9.0)
[![OpenTelemetry .NET Auto Instrumentation](https://img.shields.io/badge/OTelAuto-v1.7.0-blueviolet)](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.7.0)
[![OpenTelemetry .NET Auto Instrumentation](https://img.shields.io/badge/OTelAuto-v1.8.0-blueviolet)](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.8.0)
[![Splunk GDI Specification](https://img.shields.io/badge/GDI-1.6.0-blueviolet)](https://github.com/signalfx/gdi-specification/releases/tag/v1.6.0)
[![Keep a Changelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog-%23E05735)](CHANGELOG.md)
[![LICENSE](https://img.shields.io/github/license/signalfx/splunk-otel-dotnet)](LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ partial class Build : NukeBuild
[Parameter("Configuration to build - Default is 'Release'")]
readonly Configuration Configuration = Configuration.Release;

const string OpenTelemetryAutoInstrumentationDefaultVersion = "v1.7.0";
const string OpenTelemetryAutoInstrumentationDefaultVersion = "v1.8.0";

[Parameter($"OpenTelemetry AutoInstrumentation dependency version - Default is '{OpenTelemetryAutoInstrumentationDefaultVersion}'")]
readonly string OpenTelemetryAutoInstrumentationVersion = OpenTelemetryAutoInstrumentationDefaultVersion;
Expand Down
6 changes: 3 additions & 3 deletions docs/advanced-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## OpenTelemetry configuration

See [Open Telemetry Auto Instrumentation documentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.7.0/docs/config.md)
See [Open Telemetry Auto Instrumentation documentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.8.0/docs/config.md)
for configuration details.

## Splunk distribution configuration
Expand All @@ -23,7 +23,7 @@ Download and install the latest binaries from

When running your application, make sure to:

1. Set the [resources](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.7.0/docs/config.md#resources).
1. Set the [resources](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.8.0/docs/config.md#resources).
1. Set the environment variables from the table below.

| Environment variable | .NET version | Value |
Expand All @@ -45,7 +45,7 @@ When running your application, make sure to:
| `OTEL_DOTNET_AUTO_HOME` | All versions | `$INSTALL_DIR` |
| `OTEL_DOTNET_AUTO_PLUGINS` | All versions | `Splunk.OpenTelemetry.AutoInstrumentation.Plugin, Splunk.OpenTelemetry.AutoInstrumentation` |

> Some settings can be omitted on .NET. For more information, see the [documentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.7.0/docs/config.md#net-clr-profiler).
> Some settings can be omitted on .NET. For more information, see the [documentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.8.0/docs/config.md#net-clr-profiler).
## Splunk plugin settings

Expand Down
22 changes: 14 additions & 8 deletions script-templates/splunk-otel-dotnet-install.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ case "$ARCHITECTURE" in
esac

test -z "$OTEL_DOTNET_AUTO_HOME" && OTEL_DOTNET_AUTO_HOME="$HOME/.splunk-otel-dotnet"
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
test -z "$VERSION" && VERSION="v{{VERSION}}"

DOWNLOAD_DIR="${DOWNLOAD_DIR:=${TMPDIR:=$(mktemp -d)}}"

RELEASES_URL="https://github.com/signalfx/splunk-otel-dotnet/releases"
ARCHIVE="splunk-opentelemetry-dotnet-$OS_TYPE.zip"

Expand All @@ -58,11 +59,16 @@ if echo "$OS_TYPE" | grep -q "linux"; then
ARCHIVE="splunk-opentelemetry-dotnet-$OS_TYPE-$ARCHITECTURE.zip"
fi

TMPFILE="$TMPDIR/$ARCHIVE"
(
cd "$TMPDIR"
echo "Downloading $VERSION for $OS_TYPE..."
curl -sSfLo "$TMPFILE" "$RELEASES_URL/download/$VERSION/$ARCHIVE"
)
LOCAL_PATH="${LOCAL_PATH:=$DOWNLOAD_DIR/$ARCHIVE}"
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"
)
else
echo "Using local installation archive: $LOCAL_PATH"
fi

rm -rf "$OTEL_DOTNET_AUTO_HOME"
unzip -q "$TMPFILE" -d "$OTEL_DOTNET_AUTO_HOME"
unzip -q "$LOCAL_PATH" -d "$OTEL_DOTNET_AUTO_HOME"
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<Content Include="splunk-launch.*">
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.7.0">
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.8.0">
<PrivateAssets>none</PrivateAssets> <!-- Ensures that content and build transitive dependencies are properly delivered -->
</PackageReference>
<None Include="splunk-logo-256x256.png" Pack="true" PackagePath="images" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ you to either add the missing instrumentation package or to skip the
instrumentation of the corresponding package:

```terminal
~packages/opentelemetry.autoinstrumentation.buildtasks/1.7.0/build/OpenTelemetry.AutoInstrumentation.BuildTasks.targets(29,5): error : OpenTelemetry.AutoInstrumentation: add a reference to the instrumentation package 'MongoDB.Driver.Core.Extensions.DiagnosticSources' version 1.4.0 or add 'MongoDB.Driver.Core' to the property 'SkippedInstrumentations' to suppress this error.
~packages/opentelemetry.autoinstrumentation.buildtasks/1.8.0/build/OpenTelemetry.AutoInstrumentation.BuildTasks.targets(29,5): error : OpenTelemetry.AutoInstrumentation: add a reference to the instrumentation package 'MongoDB.Driver.Core.Extensions.DiagnosticSources' version 1.4.0 or add 'MongoDB.Driver.Core' to the property 'SkippedInstrumentations' to suppress this error.
```

To resolve the error either add the recommended instrumentation package or skip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/net/OpenTelemetry.Resources.Azure.dll,
/net/OpenTelemetry.Resources.Container.dll,
/net/OpenTelemetry.Resources.Host.dll,
/net/OpenTelemetry.Resources.OperatingSystem.dll,
/net/OpenTelemetry.Resources.Process.dll,
/net/OpenTelemetry.Resources.ProcessRuntime.dll,
/net/OpenTelemetry.Shims.OpenTracing.dll,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/net/OpenTelemetry.Resources.Azure.dll,
/net/OpenTelemetry.Resources.Container.dll,
/net/OpenTelemetry.Resources.Host.dll,
/net/OpenTelemetry.Resources.OperatingSystem.dll,
/net/OpenTelemetry.Resources.Process.dll,
/net/OpenTelemetry.Resources.ProcessRuntime.dll,
/net/OpenTelemetry.Shims.OpenTracing.dll,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/net/OpenTelemetry.Resources.Azure.dll,
/net/OpenTelemetry.Resources.Container.dll,
/net/OpenTelemetry.Resources.Host.dll,
/net/OpenTelemetry.Resources.OperatingSystem.dll,
/net/OpenTelemetry.Resources.Process.dll,
/net/OpenTelemetry.Resources.ProcessRuntime.dll,
/net/OpenTelemetry.Shims.OpenTracing.dll,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/net/OpenTelemetry.Resources.Azure.dll,
/net/OpenTelemetry.Resources.Container.dll,
/net/OpenTelemetry.Resources.Host.dll,
/net/OpenTelemetry.Resources.OperatingSystem.dll,
/net/OpenTelemetry.Resources.Process.dll,
/net/OpenTelemetry.Resources.ProcessRuntime.dll,
/net/OpenTelemetry.Shims.OpenTracing.dll,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
/net/OpenTelemetry.Resources.Azure.dll,
/net/OpenTelemetry.Resources.Container.dll,
/net/OpenTelemetry.Resources.Host.dll,
/net/OpenTelemetry.Resources.OperatingSystem.dll,
/net/OpenTelemetry.Resources.Process.dll,
/net/OpenTelemetry.Resources.ProcessRuntime.dll,
/net/OpenTelemetry.Shims.OpenTracing.dll,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
\net\OpenTelemetry.Resources.Azure.dll,
\net\OpenTelemetry.Resources.Container.dll,
\net\OpenTelemetry.Resources.Host.dll,
\net\OpenTelemetry.Resources.OperatingSystem.dll,
\net\OpenTelemetry.Resources.Process.dll,
\net\OpenTelemetry.Resources.ProcessRuntime.dll,
\net\OpenTelemetry.Shims.OpenTracing.dll,
Expand Down Expand Up @@ -87,6 +88,7 @@
\netfx\OpenTelemetry.Instrumentation.Wcf.dll,
\netfx\OpenTelemetry.Resources.Azure.dll,
\netfx\OpenTelemetry.Resources.Host.dll,
\netfx\OpenTelemetry.Resources.OperatingSystem.dll,
\netfx\OpenTelemetry.Resources.Process.dll,
\netfx\OpenTelemetry.Resources.ProcessRuntime.dll,
\netfx\OpenTelemetry.Shims.OpenTracing.dll,
Expand Down
5 changes: 3 additions & 2 deletions tools/MatrixHelper/InstrumentationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ public static Instrumentation[] GetInstrumentations()
new(new[] { "HTTPCLIENT" }, new[] { new InstrumentedComponent("System.Net.Http.HttpClient", "See general requirements"), new InstrumentedComponent("System.Net.HttpWebRequest", "See general requirements") }, null, "beta", "community", new[] { new Dependency("HttpClient and HttpWebRequest instrumentation for OpenTelemetry", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Http", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Http", "1.9.0", "beta") }, new SignalsList[] { new TracesList(), new MetricList(httpClientMetrics) }, new Setting[] { new("OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS", "A comma-separated list of HTTP header names. HTTP Client instrumentations will capture HTTP request header values for all configured header names.", string.Empty, "string", SettingsData.InstrumentationCategory), new("OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS", "A comma-separated list of HTTP header names. HTTP Client instrumentations will capture HTTP response header values for all configured header names.", string.Empty, "string", SettingsData.InstrumentationCategory), new("OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION", "Whether the HTTP client instrumentation turns off redaction of the `url.full` attribute value.", "false", "boolean", SettingsData.InstrumentationCategory) }),
new("KAFKA", new InstrumentedComponent("Confluent.Kafka", "ARM64: 1.8.2 to 3.0.0. Other platforms: 1.4.0 to 3.0.0"), null, "beta", "community", new TracesList()),
new("MASSTRANSIT", new InstrumentedComponent("MassTransit", "8.0.0 and higher"), "Not supported on .NET Framework", "beta", "third-party", new TracesList()),
new("MONGODB", new InstrumentedComponent("MongoDB.Driver.Core", "2.13.3 to 3.0.0"), "Not supported on .NET Framework", "beta", "third-party", new TracesList()),
new("MONGODB", new InstrumentedComponent("MongoDB.Driver.Core", "2.28.0 to 3.0.0"), "Not supported on .NET Framework", "beta", "third-party", new TracesList()),
new("MYSQLCONNECTOR", new InstrumentedComponent("MySqlConnector", "2.0.0 and higher"), null, "beta", "third-party", new TracesList()),
new("MYSQLDATA", new InstrumentedComponent("MySql.Data", "8.1.0 and higher"), "Not supported on .NET Framework", "beta", "third-party", new TracesList()),
new("NPGSQL", new InstrumentedComponent("Npgsql", "6.0.0 and higher"), null, "beta", "third-party", new TracesList()),
new(new[] { "ORACLEMDA" }, new[] { new InstrumentedComponent("Oracle.ManagedDataAccess.Core", "23.4.0 and higher"), new InstrumentedComponent("Oracle.ManagedDataAccess", "23.4.0 and higher") }, "Not supported on ARM64", "beta", "third-party", Array.Empty<Dependency>(), new SignalsList[] { new TracesList() }, new Setting[] { new("OTEL_DOTNET_AUTO_ORACLEMDA_SET_DBSTATEMENT_FOR_TEXT", "Whether the Oracle Client instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures.", "false", "boolean", SettingsData.InstrumentationCategory) }),
new(new[] { "NSERVICEBUS" }, new[] { new InstrumentedComponent("NServiceBus", "8.0.0 to 10.0.0") }, null, "beta", "third-party", Array.Empty<Dependency>(), new SignalsList[] { new TracesList(), new MetricList(new MetricData("nservicebus.messaging.successes", counter, "Number of messages successfully processed by the endpoint."), new MetricData("nservicebus.messaging.fetches", counter, "Number of messages retrieved from the queue by the endpoint."), new MetricData("nservicebus.messaging.failures", counter, "Number of messages unsuccessfully processed by the endpoint.")) }, Array.Empty<Setting>()),
new("QUARTZ", new InstrumentedComponent("Quartz", "3.4.0 and higher"), "Not supported on .NET Framework 4.7.1 and lower", "beta", "community", new Dependency("QuartzNET Instrumentation for OpenTelemetry .NET", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Quartz", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Quartz", "1.0.0-beta.3", "beta"), new SignalsList[] { new TracesList() }),
new("RABBITMQ", new InstrumentedComponent("RabbitMQ.Client", "6.0.0 to 7.0.0"), null, "beta", "community", new TracesList()),
new(new[] { "SQLCLIENT" }, new[] { new InstrumentedComponent("Microsoft.Data.SqlClient", "v3.* is not supported on .NET Framework"), new InstrumentedComponent("System.Data.SqlClient", "4.8.5 and higher"), new InstrumentedComponent("System.Data", "Shipped with .NET Framework") }, null, "beta", "community", new Dependency[] { new Dependency("SqlClient instrumentation for OpenTelemetry .NET", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.SqlClient", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.SqlClient", "1.9.0-beta.1", "beta") }, new SignalsList[] { new TracesList() }, new Setting[] { new("OTEL_DOTNET_AUTO_SQLCLIENT_SET_DBSTATEMENT_FOR_TEXT", "Whether the SQL Client instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures. Not supported on .NET Framework for System.Data.SqlClient.", "false", "boolean", SettingsData.InstrumentationCategory) }),
new("STACKEXCHANGEREDIS", new InstrumentedComponent("StackExchange.Redis", "2.0.405 to 3.0.0"), "Not supported on .NET Framework", "beta", "community", new Dependency("StackExchange.Redis Instrumentation for OpenTelemetry", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.StackExchangeRedis", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.StackExchangeRedis", "1.0.0-rc9.15", "beta"), new SignalsList[] { new TracesList() }),
new("STACKEXCHANGEREDIS", new InstrumentedComponent("StackExchange.Redis", "2.6.122 to 3.0.0"), "Not supported on .NET Framework", "beta", "community", new Dependency("StackExchange.Redis Instrumentation for OpenTelemetry", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.StackExchangeRedis", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.StackExchangeRedis", "1.0.0-rc9.15", "beta"), new SignalsList[] { new TracesList() }),
new(new[] { "WCFCLIENT", "WCFSERVICE" }, new[] { new InstrumentedComponent("System.ServiceModel", "4.7.0 and higher of `System.ServiceModel.Primitives`") }, "Service side not supported on .NET. `WCFCLIENT` for client side instrumentation and `WCFSERVICE` for service side instrumentation", "beta", "community", new[] { new Dependency("WCF Instrumentation for OpenTelemetry .NET", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Wcf", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Wcf", "1.0.0-rc.17", "beta") }, new SignalsList[] { new TracesList() }, Array.Empty<Setting>()),

new("NETRUNTIME", new InstrumentedComponent(".NET runtime", null), null, "beta", "community", new Dependency("Runtime Instrumentation for OpenTelemetry .NET", "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Runtime", "https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime", "1.9.0", "stable"), new SignalsList[] { new MetricList(netRuntimeMetrics) }),
Expand Down
2 changes: 1 addition & 1 deletion tools/MatrixHelper/MetadataData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static AllInOne GetAllInOne()
dependencies: new Dependency[]
{
new("OpenTelemetry .NET", "https://github.com/open-telemetry/opentelemetry-dotnet", null, "1.9.0", "stable"),
new("OpenTelemetry .NET Automatic Instrumentation", "https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation", null, "1.7.0", "stable"),
new("OpenTelemetry .NET Automatic Instrumentation", "https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation", null, "1.8.0", "stable"),
},
settings: SettingsData.GetSettings(),
instrumentations: InstrumentationData.GetInstrumentations(),
Expand Down
Loading

0 comments on commit b59486b

Please sign in to comment.