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

SemanticConventions: update link to v1.21.0 tag #4659

Merged
merged 4 commits into from
Jul 14, 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
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Unreleased

* 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.
* Updated Semantic Conventions to [v1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/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`.
([#4537](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4537))
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/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/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/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
if (this.emitNewAttributes)
{
tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeNetworkProtocolVersion, HttpTagHelper.GetFlavorTagValueFromProtocol(context.Request.Protocol)));
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Unreleased

* Updated [Http 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.
* Updated Semantic Conventions to [v1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/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`.
([#4538](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4538))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void OnStartActivity(Activity activity, object payload)
activity.SetTag(SemanticConventions.AttributeHttpFlavor, HttpTagHelper.GetFlavorTagValueFromProtocolVersion(request.Version));
}

// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
if (this.emitNewAttributes)
{
activity.SetTag(SemanticConventions.AttributeHttpRequestMethod, HttpTagHelper.GetNameForHttpMethod(request.Method));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public override void OnEventWritten(string name, object payload)
}
}

// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
if (this.emitNewAttributes)
{
tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeHttpRequestMethod, HttpTagHelper.GetNameForHttpMethod(request.Method)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static void AddRequestTagsAndInstrumentRequest(HttpWebRequest request, A
activity.SetTag(SemanticConventions.AttributeHttpFlavor, HttpTagHelper.GetFlavorTagValueFromProtocolVersion(request.ProtocolVersion));
}

// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
if (emitNewAttributes)
{
activity.SetTag(SemanticConventions.AttributeHttpRequestMethod, request.Method);
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Unreleased

* 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.
* Updated Semantic Conventions to [v1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/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`.
([#4644](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4644))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ internal void AddConnectionLevelDetailsToActivity(string dataSource, Activity sq
}
}

// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md
if (this.emitNewAttributes)
{
if (!string.IsNullOrEmpty(connectionDetails.ServerHostName))
Expand Down
2 changes: 1 addition & 1 deletion 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/semantic-conventions/blob/main/docs/http/http-spans.md"/>.
/// <see href="https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md"/>.
/// </remarks>
internal static class HttpSemanticConventionHelper
{
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/SemanticConventions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ internal static class SemanticConventions
public const string AttributeExceptionStacktrace = "exception.stacktrace";

// 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
// https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
// https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
namespace OpenTelemetry.Instrumentation.Http.Tests
{
// Tests for v1.21.0 Semantic Conventions for Http spans
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
// These tests emit both the new and older attributes.
// This test class can be deleted when this library is GA.
public class HttpWebRequestActivitySourceTestsDupe : IDisposable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
namespace OpenTelemetry.Instrumentation.Http.Tests
{
// Tests for v1.21.0 Semantic Conventions for Http spans
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
// These tests emit the new attributes.
// This test class can replace the other class when this library is GA.
public class HttpWebRequestActivitySourceTestsNew : IDisposable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void SqlClientInstrumentationOptions_EnableConnectionLevelAttributes(
}

// Tests for v1.21.0 Semantic Conventions for database client calls.
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md
// This test emits the new attributes.
// This test method can replace the other (old) test method when this library is GA.
[Theory]
Expand Down Expand Up @@ -151,7 +151,7 @@ public void SqlClientInstrumentationOptions_EnableConnectionLevelAttributes_New(
}

// Tests for v1.21.0 Semantic Conventions for database client calls.
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md
// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md
// This test emits both the new and older attributes.
// This test method can be deleted when this library is GA.
[Theory]
Expand Down