Renaming from OT to OTel (#1046)
* Renaming from OT to OTel * updating to full name and suggestion * updating changelog Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
parent
7943d96938
commit
dad644aae1
|
|
@ -41,14 +41,14 @@ namespace Examples.Console
|
|||
// which decide to use Open Telemetry.
|
||||
|
||||
// Libraries would simply write the following lines of code to
|
||||
// emit activities, which are the .NET representation of OT Spans.
|
||||
// emit activities, which are the .NET representation of OpenTelemetry Spans.
|
||||
var source = new ActivitySource("MyCompany.MyProduct.MyWebServer");
|
||||
|
||||
// The below commented out line shows more likely code in a real world webserver.
|
||||
// using (var parent = source.StartActivity("HttpIn", ActivityKind.Server, HttpContext.Request.Headers["traceparent"] ))
|
||||
using (var parent = source.StartActivity("HttpIn", ActivityKind.Server))
|
||||
{
|
||||
// TagNames can follow the OT guidelines
|
||||
// TagNames can follow the OpenTelemetry guidelines
|
||||
// from https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/trace/semantic_conventions
|
||||
parent?.SetTag("http.method", "GET");
|
||||
parent?.SetTag("http.host", "MyHostName");
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Examples.Console
|
|||
.Build();
|
||||
|
||||
// The above lines are required only in Applications
|
||||
// which decide to use OT.
|
||||
// which decide to use OpenTelemetry.
|
||||
|
||||
using (var sample = new InstrumentationWithActivitySource())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Examples.Console
|
|||
.Build();
|
||||
|
||||
// The above line is required only in Applications
|
||||
// which decide to use OT.
|
||||
// which decide to use OpenTelemetry.
|
||||
using (var sample = new InstrumentationWithActivitySource())
|
||||
{
|
||||
sample.Start();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
* Renaming from `ot` to `otel`
|
||||
([#1046](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1046))
|
||||
* Added `RuntimeContext` API
|
||||
([#948](https://github.com/open-telemetry/opentelemetry-dotnet/pull/948))
|
||||
* Changed `Link` constructor to accept `ActivityTagsCollection` instead of
|
||||
|
|
|
|||
|
|
@ -301,9 +301,9 @@ OpenTelemetry defines a concept called
|
|||
to be associated with `Activity`. There is no `Status` class in .NET, and hence
|
||||
`Status` is set to an `Activity` using the following special tags
|
||||
|
||||
`ot.status_code` is the `Tag` name used to store the [Status Canonical
|
||||
`otel.status_code` is the `Tag` name used to store the [Status Canonical
|
||||
Code](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#statuscanonicalcode).
|
||||
`ot.status_description` is the `Tag` name used to store the optional
|
||||
`otel.status_description` is the `Tag` name used to store the optional
|
||||
[Description](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#getdescription)
|
||||
|
||||
Example:
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace OpenTelemetry.Trace
|
|||
/// <summary>
|
||||
/// Sets the status of activity execution.
|
||||
/// Activity class in .NET does not support 'Status'.
|
||||
/// This extension provides a workaround to store Status as special tags with key name of ot.status_code and ot.status_description.
|
||||
/// This extension provides a workaround to store Status as special tags with key name of otel.status_code and otel.status_description.
|
||||
/// Read more about SetStatus here https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#set-status.
|
||||
/// </summary>
|
||||
/// <param name="activity">Activity instance.</param>
|
||||
|
|
@ -50,7 +50,7 @@ namespace OpenTelemetry.Trace
|
|||
/// <summary>
|
||||
/// Gets the status of activity execution.
|
||||
/// Activity class in .NET does not support 'Status'.
|
||||
/// This extension provides a workaround to retrieve Status from special tags with key name ot.status_code and ot.status_description.
|
||||
/// This extension provides a workaround to retrieve Status from special tags with key name otel.status_code and otel.status_description.
|
||||
/// </summary>
|
||||
/// <param name="activity">Activity instance.</param>
|
||||
/// <returns>Activity execution status.</returns>
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ namespace OpenTelemetry.Trace
|
|||
public static class SpanAttributeConstants
|
||||
{
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
public const string StatusCodeKey = "ot.status_code";
|
||||
public const string StatusDescriptionKey = "ot.status_description";
|
||||
public const string StatusCodeKey = "otel.status_code";
|
||||
public const string StatusDescriptionKey = "otel.status_description";
|
||||
|
||||
public const string HttpPathKey = "http.path";
|
||||
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@ namespace OpenTelemetry.Exporter.Prometheus
|
|||
{
|
||||
/* For Summary we emit one row for Sum, Count, Min, Max.
|
||||
Min,Max exports as quantile 0 and 1.
|
||||
In future, when OT implements more aggregation algorithms,
|
||||
this section will need to be revisited.
|
||||
In future, when OpenTelemetry implements more aggregation
|
||||
algorithms, this section will need to be revisited.
|
||||
Sample output:
|
||||
MyMeasure_sum{dim1="value1"} 750 1587013352982
|
||||
MyMeasure_count{dim1="value1"} 5 1587013352982
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace OpenTelemetry.Trace
|
|||
/// </summary>
|
||||
public static class ActivityExtensions
|
||||
{
|
||||
internal const string ResourcePropertyName = "ot.resource";
|
||||
internal const string ResourcePropertyName = "otel.resource";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Resource associated with the Activity.
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ namespace OpenTelemetry.Exporter.Prometheus.Tests
|
|||
// Once a pull model is implemented, we'll not have this issue and we need to add tests
|
||||
// at that time.
|
||||
|
||||
// If in future, there is a official .NET Prometheus Client library, and OT Exporter
|
||||
// If in future, there is an official .NET Prometheus Client library, and OpenTelemetry Exporter
|
||||
// choses to take a dependency on it, then none of these concerns arise.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace OpenTelemetry.Instrumentation.Grpc.Tests
|
|||
Assert.Equal($"http://localhost:{this.fixture.Port}/greet.Greeter/SayHello", span.Tags.FirstOrDefault(i => i.Key == SemanticConventions.AttributeHttpUrl).Value);
|
||||
Assert.StartsWith("grpc-dotnet", span.Tags.FirstOrDefault(i => i.Key == SemanticConventions.AttributeHttpUserAgent).Value);
|
||||
|
||||
// This attribute is added by the gRPC for .NET library. There is a discussion of having the OTel instrumentation remove it.
|
||||
// This attribute is added by the gRPC for .NET library. There is a discussion of having the OpenTelemetry instrumentation remove it.
|
||||
// See: https://github.com/open-telemetry/opentelemetry-dotnet/issues/482#issuecomment-655753756
|
||||
Assert.Equal($"0", span.Tags.FirstOrDefault(i => i.Key == "grpc.status_code").Value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace OpenTelemetry.Instrumentation.Http.Tests
|
|||
Assert.Equal(tc.SpanStatusHasDescription.Value, !string.IsNullOrEmpty(desc));
|
||||
}
|
||||
|
||||
var normalizedAttributes = span.TagObjects.Where(kv => !kv.Key.StartsWith("ot")).ToImmutableSortedDictionary(x => x.Key, x => x.Value.ToString());
|
||||
var normalizedAttributes = span.TagObjects.Where(kv => !kv.Key.StartsWith("otel.")).ToImmutableSortedDictionary(x => x.Key, x => x.Value.ToString());
|
||||
var normalizedAttributesTestCase = tc.SpanAttributes.ToDictionary(x => x.Key, x => HttpTestData.NormalizeValues(x.Value, host, port));
|
||||
|
||||
Assert.Equal(normalizedAttributesTestCase.Count, normalizedAttributes.Count);
|
||||
|
|
|
|||
Loading…
Reference in New Issue