diff --git a/.cspell/other.txt b/.cspell/other.txt
index a57ef5de..4f1a6910 100644
--- a/.cspell/other.txt
+++ b/.cspell/other.txt
@@ -3,6 +3,7 @@ Bson
buildtasks
Configurator
coreutils
+distro
dylib
Expector
mktemp
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b6da8a4..0ca45741 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,8 +11,14 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
### Changed
+- Updated value for following attributes:
+ - `telemetry.distro.name` to `splunk-otel-dotnet`
+ - `telemetry.distro.version` to current release version.
+
### Deprecated
+- Deprecate `splunk.otel.version` attribute.
+
### Removed
### Fixed
diff --git a/docs/bump-upstream.md b/docs/bump-upstream.md
index 39c928d3..e562ca3f 100644
--- a/docs/bump-upstream.md
+++ b/docs/bump-upstream.md
@@ -5,7 +5,6 @@
- [`build/Build.cs`](../build/Build.cs)
- [`docs/advanced-config.md`](./advanced-config.md)
- [`src/Splunk.OpenTelemetry.AutoInstrumentation/Splunk.OpenTelemetry.AutoInstrumentation.csproj`](../src/Splunk.OpenTelemetry.AutoInstrumentation/Splunk.OpenTelemetry.AutoInstrumentation.csproj)
- - [`test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/Helpers/ResourceExpectorExtensions.cs`](../test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/Helpers/ResourceExpectorExtensions.cs)
1. Update the `test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/BuildTests.DistributionStructure_*.verified.txt`
files.
diff --git a/src/Splunk.OpenTelemetry.AutoInstrumentation/ResourceConfigurator.cs b/src/Splunk.OpenTelemetry.AutoInstrumentation/ResourceConfigurator.cs
index 4c9579f7..c92a2e38 100644
--- a/src/Splunk.OpenTelemetry.AutoInstrumentation/ResourceConfigurator.cs
+++ b/src/Splunk.OpenTelemetry.AutoInstrumentation/ResourceConfigurator.cs
@@ -21,7 +21,13 @@ namespace Splunk.OpenTelemetry.AutoInstrumentation;
internal static class ResourceConfigurator
{
+ ///
+ /// splunk.otel.version is deprecated
+ ///
private const string SplunkDistroVersionName = "splunk.distro.version";
+ private const string TelemetryDistroNameName = "telemetry.distro.name";
+ private const string TelemetryDistroNameValue = "splunk-otel-dotnet";
+ private const string TelemetryDistroVersionName = "telemetry.distro.version";
private static readonly string Version;
@@ -45,7 +51,9 @@ public static void Configure(ResourceBuilder resourceBuilder, PluginSettings set
{
var attributes = new List>
{
- new(SplunkDistroVersionName, Version)
+ new(SplunkDistroVersionName, Version),
+ new(TelemetryDistroNameName, TelemetryDistroNameValue),
+ new(TelemetryDistroVersionName, Version)
};
resourceBuilder.AddAttributes(attributes);
diff --git a/test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/Helpers/ResourceExpectorExtensions.cs b/test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/Helpers/ResourceExpectorExtensions.cs
index 8b746a3f..22434d12 100644
--- a/test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/Helpers/ResourceExpectorExtensions.cs
+++ b/test/Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests/Helpers/ResourceExpectorExtensions.cs
@@ -29,8 +29,8 @@ public static void ExpectDistributionResources(this OtlpResourceExpector resourc
resourceExpector.Expect("telemetry.sdk.name", "opentelemetry");
resourceExpector.Expect("telemetry.sdk.language", "dotnet");
resourceExpector.Expect("telemetry.sdk.version", ExpectedSdkVersion);
- resourceExpector.Expect("telemetry.distro.name", "opentelemetry-dotnet-instrumentation");
- resourceExpector.Expect("telemetry.distro.version", "1.1.0");
+ resourceExpector.Expect("telemetry.distro.name", "splunk-otel-dotnet");
+ resourceExpector.Expect("telemetry.distro.version", ExpectedDistributionVersion);
resourceExpector.Expect("splunk.distro.version", ExpectedDistributionVersion);
}
}
diff --git a/test/Splunk.OpenTelemetry.AutoInstrumentation.Tests/ResourceConfiguratorTests.cs b/test/Splunk.OpenTelemetry.AutoInstrumentation.Tests/ResourceConfiguratorTests.cs
index f327b7ac..c233485c 100644
--- a/test/Splunk.OpenTelemetry.AutoInstrumentation.Tests/ResourceConfiguratorTests.cs
+++ b/test/Splunk.OpenTelemetry.AutoInstrumentation.Tests/ResourceConfiguratorTests.cs
@@ -39,14 +39,15 @@ public void ConfigureSplunkDistributionVersion()
ResourceConfigurator.Configure(resourceBuilder, settings);
var resource = resourceBuilder.Build();
-
+ var version = typeof(Plugin).Assembly.GetCustomAttribute()!.InformationalVersion.Split('+')[0];
using (new AssertionScope())
{
- resource.Attributes.Count().Should().Be(1);
-
- var attribute = resource.Attributes.First();
- attribute.Key.Should().Be("splunk.distro.version");
- (attribute.Value as string).Should().Be(typeof(Plugin).Assembly.GetCustomAttribute()!.InformationalVersion.Split('+')[0]);
+ resource.Attributes.Should().BeEquivalentTo(new Dictionary
+ {
+ { "splunk.distro.version", version },
+ { "telemetry.distro.name", "splunk-otel-dotnet" },
+ { "telemetry.distro.version", version }
+ });
}
}
}