Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Convention changes. correct link and update changelog. #4655

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

## Unreleased

* Updated [Http Semantic Conventions](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/trace/semantic_conventions/http.md).
This library can emit either old, new, or both attributes. Users can control
which attributes are emitted by setting the environment variable
`OTEL_SEMCONV_STABILITY_OPT_IN`.
* Updated [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md).
to v1.21.0. This library can emit either old, new, or both attributes.
Users can control which attributes are emitted by setting the environment
variable `OTEL_SEMCONV_STABILITY_OPT_IN`.
([#4537](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4537))
([#4606](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4606))

* Fixed an issue affecting NET 7.0+. If custom propagation is being used
and tags are added to an Activity during sampling then that Activity would be dropped.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void OnStartActivity(Activity activity, object payload)
}
}

// see the spec https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/trace/semantic_conventions/http.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
if (this.emitNewAttributes)
{
if (request.Host.HasValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public override void OnEventWritten(string name, object payload)
}
}

// see the spec https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/trace/semantic_conventions/http.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
if (this.emitNewAttributes)
{
tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeNetworkProtocolVersion, HttpTagHelper.GetFlavorTagValueFromProtocol(context.Request.Protocol)));
Expand Down
6 changes: 3 additions & 3 deletions src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Unreleased

* Updated [Http Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md).
This library can emit either old, new, or both attributes. Users can control
which attributes are emitted by setting the environment variable
`OTEL_SEMCONV_STABILITY_OPT_IN`.
to v1.21.0. This library can emit either old, new, or both attributes.
Users can control which attributes are emitted by setting the environment
variable `OTEL_SEMCONV_STABILITY_OPT_IN`.
([#4538](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4538))
([#4639](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4639))

Expand Down
8 changes: 4 additions & 4 deletions src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Unreleased

* Updated [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md).
This library can emit either old, new, or both attributes. Users can control
which attributes are emitted by setting the environment variable
`OTEL_SEMCONV_STABILITY_OPT_IN`.
* Updated [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md)
to v1.21.0. This library can emit either old, new, or both attributes.
Users can control which attributes are emitted by setting the environment
variable `OTEL_SEMCONV_STABILITY_OPT_IN`.
([#4644](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4644))

## 1.5.0-beta.1
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/HttpSemanticConventionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace OpenTelemetry.Internal;
/// Due to a breaking change in the semantic convention, affected instrumentation libraries
/// must inspect an environment variable to determine which attributes to emit.
/// This is expected to be removed when the instrumentation libraries reach Stable.
/// <see href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md"/>.
/// <see href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md"/>.
/// </remarks>
internal static class HttpSemanticConventionHelper
{
Expand All @@ -43,7 +43,7 @@ public enum HttpSemanticConvention
Old = 0x1,

/// <summary>
/// Instructs an instrumentation library to emit the new, stable Http attributes.
/// Instructs an instrumentation library to emit the new, v1.21.0 Http attributes.
/// </summary>
New = 0x2,

Expand Down
4 changes: 3 additions & 1 deletion src/Shared/SemanticConventions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ internal static class SemanticConventions
public const string AttributeExceptionMessage = "exception.message";
public const string AttributeExceptionStacktrace = "exception.stacktrace";

// Http v1.21.0 https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/trace/semantic_conventions/http.md
// v1.21.0 (unreleased as of this commit)
// https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
// https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md
public const string AttributeHttpRequestMethod = "http.request.method"; // replaces: "http.method" (AttributeHttpMethod)
public const string AttributeHttpResponseStatusCode = "http.response.status_code"; // replaces: "http.status_code" (AttributeHttpStatusCode)
public const string AttributeNetworkProtocolVersion = "network.protocol.version"; // replaces: "http.flavor" (AttributeHttpFlavor)
Expand Down