use OpenTelemetry and otel consistently (#1158)

This commit is contained in:
Reiley Yang 2020-08-24 18:06:39 -07:00 committed by GitHub
parent e411956c1f
commit 552728a7bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 38 additions and 38 deletions

View File

@ -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" />

View File

@ -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" />

View File

@ -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" />

View File

@ -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.

View File

@ -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");

View File

@ -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

View File

@ -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

View File

@ -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; }
}

View File

@ -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.")]

View File

@ -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
{

View File

@ -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.

View File

@ -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]);
}