-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Telemetry Schema Url in tracing and metrics (#113034)
* Support Telemetry Schema Url in tracing and metrics * Test fix * Feedback * Fix the setters in the ref code
- Loading branch information
Showing
10 changed files
with
343 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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.