-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Support Telemetry Schema Url in tracing and metrics #113034
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...aries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySourceOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace System.Diagnostics | ||
{ | ||
/// <summary> | ||
/// Options for creating a <see cref="ActivitySource"/>. | ||
/// </summary> | ||
public class ActivitySourceOptions | ||
{ | ||
private string _name; | ||
|
||
/// <summary> | ||
/// Constructs a new instance of <see cref="ActivitySourceOptions"/>. | ||
/// </summary> | ||
/// <param name="name">The name of the <see cref="ActivitySourceOptions"/> object</param> | ||
public ActivitySourceOptions(string name) | ||
{ | ||
_name = name ?? throw new ArgumentNullException(nameof(name)); | ||
} | ||
|
||
/// <summary> | ||
/// Get or set the <see cref="ActivitySourceOptions"/> object name. Cannot be null. | ||
/// </summary> | ||
public string Name | ||
{ | ||
get => _name; | ||
set => _name = value ?? throw new ArgumentNullException(nameof(value)); | ||
} | ||
|
||
/// <summary> | ||
/// The optional <see cref="ActivitySourceOptions"/> version. Defaulted to empty string. | ||
/// </summary> | ||
public string? Version { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// The optional list of key-value pair tags associated with the <see cref="ActivitySourceOptions"/>. | ||
/// </summary> | ||
public IEnumerable<KeyValuePair<string, object?>>? Tags { get; set; } | ||
|
||
/// <summary> | ||
/// The optional schema URL specifies a location of a <see href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/schemas/file_format_v1.1.0.md">Schema File</see> that | ||
/// can be retrieved using HTTP or HTTPS protocol. | ||
/// </summary> | ||
public string? TelemetrySchemaUrl { get; set; } | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.