-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Feature request]: Support instrumentation scope attributes on ActivitySource #93795
Comments
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsSee open-telemetry/opentelemetry-dotnet#2417 When an instrumentation library emits telemetry, it usually follows specific semantic conventions. E.g. HTTP traces should follow Http semconv However, OTel has yet to declare its first semantic conventions as stable and they change a lot. So, it's important to know which version of OTel semconv instrumentation emits for the consumers of such telemetry. In the absence of In addition to SchemaUrl, there are other parameters instrumentations may provide when obtaining tracers( See open-telemetry/opentelemetry-dotnet#4316 for the context. Instrumentation scope attributes can be used to reduce instrumentation overhead and reduce the over-the-wire size of attributes.
|
Assigning to @noahfalk to help coordinate |
Tagging subscribers to this area: @dotnet/area-system-diagnostics-activity Issue DetailsSee open-telemetry/opentelemetry-dotnet#2417 When an instrumentation library emits telemetry, it usually follows specific semantic conventions. E.g. HTTP traces should follow Http semconv However, OTel has yet to declare its first semantic conventions as stable and they change a lot. So, it's important to know which version of OTel semconv instrumentation emits for the consumers of such telemetry. In the absence of In addition to SchemaUrl, there are other parameters instrumentations may provide when obtaining tracers( See open-telemetry/opentelemetry-dotnet#4316 for the context. Instrumentation scope attributes can be used to reduce instrumentation overhead and reduce the over-the-wire size of attributes.
|
thanks @tarekgh and sorry I did not find the original issue. The original one still does not cover the instrumentation scope attributes, so I'd prefer to keep it open. I'll modify the description to scope the issue to them. |
Cool! Yes, I mean |
namespace System.Diagnostics;
public partial class ActivitySource
{
// Existing, left as-is
// public ActivitySource(string name);
// Existing, remove optionality and mark EB never
[EditorBrowsable(EditorBrowsableState.Never)]
public ActivitySource(string name, string? version);
// New
public ActivitySource(string name, string? version = "", IEnumerable<KeyValuePair<string, object?>>? tags = default);
public IEnumerable<KeyValuePair<string, object?>>? Tags { get; }
} |
When creating a tracer (
ActivitySource
) users should be able to specify a set of instrumentation scope attributes - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#get-a-tracer.See open-telemetry/opentelemetry-dotnet#4316 for the context.
Instrumentation scope attributes can be used to reduce instrumentation overhead and reduce the over-the-wire size of attributes.
For example, Azure SDK provides Azure resource provider namespace is used by Azure Monitor (and can be used by other backends) to show icons, find corresponding resources in Azure, and allow navigating to them, etc. this value is constant for a given tracer and should be passed as an instr scope attribute rather than span attribute.
.NET does not allow to provide such attributes as of today.
proposal added by @tarekgh
Proposal
Alternative Proposal
The text was updated successfully, but these errors were encountered: