use OpenTelemetry and otel consistently (#1158)
This commit is contained in:
parent
e411956c1f
commit
552728a7bc
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="OpenTelemetry SDK Rules" Description="Open Telemetry SDK ruleset for product code." ToolsVersion="15.0">
|
||||
<RuleSet Name="OpenTelemetry SDK Rules" Description="OpenTelemetry SDK ruleset for product code." ToolsVersion="15.0">
|
||||
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
|
||||
<Name Resource="OpenTelemetrySDKRules_Name" />
|
||||
<Description Resource="OpenTelemetrySDKRules_Description" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="OpenTelemetry SDK Rules" Description="Open Telemetry SDK ruleset for product code." ToolsVersion="15.0">
|
||||
<RuleSet Name="OpenTelemetry SDK Rules" Description="OpenTelemetry SDK ruleset for product code." ToolsVersion="15.0">
|
||||
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
|
||||
<Name Resource="OpenTelemetrySDKRules_Name" />
|
||||
<Description Resource="OpenTelemetrySDKRules_Description" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="OpenTelemetry SDK Test code Rules" Description="Open Telemetry SDK ruleset for test code." ToolsVersion="15.0">
|
||||
<RuleSet Name="OpenTelemetry SDK Test code Rules" Description="OpenTelemetry SDK ruleset for test code." ToolsVersion="15.0">
|
||||
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
|
||||
<Name Resource="OpenTelemetrySDKRules_Name" />
|
||||
<Description Resource="OpenTelemetrySDKRules_Description" />
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Examples.Console
|
|||
.Build();
|
||||
|
||||
// The above line is required only in applications
|
||||
// which decide to use Open Telemetry.
|
||||
// which decide to use OpenTelemetry.
|
||||
|
||||
// Libraries would simply write the following lines of code to
|
||||
// emit activities, which are the .NET representation of OpenTelemetry Spans.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Examples.Console
|
|||
.Build();
|
||||
|
||||
// The above line is required only in applications
|
||||
// which decide to use Open Telemetry.
|
||||
// which decide to use OpenTelemetry.
|
||||
|
||||
var tracer = TracerProvider.Default.GetTracer("MyCompany.MyProduct.MyWebServer");
|
||||
var span = tracer.StartSpan("parent span");
|
||||
|
|
|
|||
|
|
@ -309,8 +309,8 @@ Code](https://github.com/open-telemetry/opentelemetry-specification/blob/master/
|
|||
Example:
|
||||
|
||||
```csharp
|
||||
activity?.SetTag("ot.status_code", "status canonical code");
|
||||
activity?.SetTag("ot.status_description", "status description");
|
||||
activity?.SetTag("otel.status_code", "status canonical code");
|
||||
activity?.SetTag("otel.status_description", "status description");
|
||||
```
|
||||
|
||||
## Instrumenting a library/application with OpenTelemetry.API Shim
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Open Telemetry - Jaeger Exporter - Apache Thrift
|
||||
# OpenTelemetry - Jaeger Exporter - Apache Thrift
|
||||
|
||||
This folder contains a stripped-down fork of the [ApacheThrift
|
||||
0.13.0.1](https://www.nuget.org/packages/ApacheThrift/0.13.0.1) library from
|
||||
|
|
|
|||
|
|
@ -13,44 +13,44 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// </copyright>
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenTelemetry.Exporter.Jaeger
|
||||
{
|
||||
public class JaegerExporterOptions
|
||||
{
|
||||
internal const string DefaultServiceName = "Open Telemetry Exporter";
|
||||
internal const string DefaultServiceName = "OpenTelemetry Exporter";
|
||||
|
||||
internal const int DefaultMaxPacketSize = 65000;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the service reporting telemetry. Default value: Open Telemetry Exporter.
|
||||
internal const int DefaultMaxPacketSize = 65000;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the service reporting telemetry. Default value: OpenTelemetry Exporter.
|
||||
/// </summary>
|
||||
public string ServiceName { get; set; } = DefaultServiceName;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Jaeger agent host. Default value: localhost.
|
||||
public string ServiceName { get; set; } = DefaultServiceName;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Jaeger agent host. Default value: localhost.
|
||||
/// </summary>
|
||||
public string AgentHost { get; set; } = "localhost";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Jaeger agent "compact thrift protocol" port. Default value: 6831.
|
||||
public string AgentHost { get; set; } = "localhost";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Jaeger agent "compact thrift protocol" port. Default value: 6831.
|
||||
/// </summary>
|
||||
public int AgentPort { get; set; } = 6831;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum packet size in bytes. Default value: 65000.
|
||||
public int AgentPort { get; set; } = 6831;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum packet size in bytes. Default value: 65000.
|
||||
/// </summary>
|
||||
public int? MaxPacketSize { get; set; } = DefaultMaxPacketSize;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum time that should elapse between flushing the internal buffer to the configured Jaeger agent. Default value: 00:00:10.
|
||||
public int? MaxPacketSize { get; set; } = DefaultMaxPacketSize;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum time that should elapse between flushing the internal buffer to the configured Jaeger agent. Default value: 00:00:10.
|
||||
/// </summary>
|
||||
public TimeSpan MaxFlushInterval { get; set; } = TimeSpan.FromSeconds(10);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tags that should be sent with telemetry.
|
||||
public TimeSpan MaxFlushInterval { get; set; } = TimeSpan.FromSeconds(10);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tags that should be sent with telemetry.
|
||||
/// </summary>
|
||||
public IEnumerable<KeyValuePair<string, object>> ProcessTags { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace OpenTelemetry.Trace
|
|||
/// <summary>
|
||||
/// Adds OpenTelemetry Protocol (OTLP) exporter to the TracerProvider.
|
||||
/// </summary>
|
||||
/// <param name="builder">Open Telemetry builder to use.</param>
|
||||
/// <param name="builder">OpenTelemetry builder to use.</param>
|
||||
/// <param name="configure">Exporter configuration options.</param>
|
||||
/// <returns>The instance of <see cref="TracerProviderBuilder"/> to chain the calls.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "The objects should not be disposed.")]
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ using OpenTelemetry.Metrics.Export;
|
|||
namespace OpenTelemetry.Exporter.Prometheus
|
||||
{
|
||||
/// <summary>
|
||||
/// Exporter of Open Telemetry metrics to Prometheus.
|
||||
/// Exporter of OpenTelemetry metrics to Prometheus.
|
||||
/// </summary>
|
||||
public class PrometheusExporter : MetricExporter
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace OpenTelemetry.Exporter.Zipkin
|
|||
/// <summary>
|
||||
/// Gets or sets the name of the service reporting telemetry.
|
||||
/// </summary>
|
||||
public string ServiceName { get; set; } = "Open Telemetry Exporter";
|
||||
public string ServiceName { get; set; } = "OpenTelemetry Exporter";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether short trace id should be used.
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace OpenTelemetry.Exporter.Zipkin.Tests
|
|||
var traceId = useShortTraceIds ? TraceId.Substring(TraceId.Length - 16, 16) : TraceId;
|
||||
|
||||
Assert.Equal(
|
||||
$@"[{{""traceId"":""{traceId}"",""name"":""Name"",""parentId"":""{ZipkinActivityConversionExtensions.EncodeSpanId(activity.ParentSpanId)}"",""id"":""{ZipkinActivityConversionExtensions.EncodeSpanId(context.SpanId)}"",""kind"":""CLIENT"",""timestamp"":{timestamp},""duration"":60000000,""localEndpoint"":{{""serviceName"":""Open Telemetry Exporter""{ipInformation}}},""annotations"":[{{""timestamp"":{eventTimestamp},""value"":""Event1""}},{{""timestamp"":{eventTimestamp},""value"":""Event2""}}],""tags"":{{""stringKey"":""value"",""longKey"":""1"",""longKey2"":""1"",""doubleKey"":""1"",""doubleKey2"":""1"",""boolKey"":""True"",""library.name"":""CreateTestActivity""}}}}]",
|
||||
$@"[{{""traceId"":""{traceId}"",""name"":""Name"",""parentId"":""{ZipkinActivityConversionExtensions.EncodeSpanId(activity.ParentSpanId)}"",""id"":""{ZipkinActivityConversionExtensions.EncodeSpanId(context.SpanId)}"",""kind"":""CLIENT"",""timestamp"":{timestamp},""duration"":60000000,""localEndpoint"":{{""serviceName"":""OpenTelemetry Exporter""{ipInformation}}},""annotations"":[{{""timestamp"":{eventTimestamp},""value"":""Event1""}},{{""timestamp"":{eventTimestamp},""value"":""Event2""}}],""tags"":{{""stringKey"":""value"",""longKey"":""1"",""longKey2"":""1"",""doubleKey"":""1"",""doubleKey2"":""1"",""boolKey"":""True"",""library.name"":""CreateTestActivity""}}}}]",
|
||||
Responses[requestId]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue