sanitize EOL for *.md files (#1257)
This commit is contained in:
parent
8b8731c3c8
commit
a6795c224f
266
README.md
266
README.md
|
|
@ -1,133 +1,133 @@
|
||||||
# OpenTelemetry .NET
|
# OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://gitter.im/open-telemetry/opentelemetry-dotnet)
|
chat](https://badges.gitter.im/open-telemetry/opentelemetry-dotnet.svg)](https://gitter.im/open-telemetry/opentelemetry-dotnet)
|
||||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/actions)
|
Status](https://action-badges.now.sh/open-telemetry/opentelemetry-dotnet)](https://github.com/open-telemetry/opentelemetry-dotnet/actions)
|
||||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/releases/)
|
[](https://github.com/open-telemetry/opentelemetry-dotnet/releases/)
|
||||||
[](https://www.nuget.org/profiles/OpenTelemetry)
|
[](https://www.nuget.org/profiles/OpenTelemetry)
|
||||||
[](https://www.nuget.org/profiles/OpenTelemetry)
|
[](https://www.nuget.org/profiles/OpenTelemetry)
|
||||||
|
|
||||||
The .NET [OpenTelemetry](https://opentelemetry.io/) client.
|
The .NET [OpenTelemetry](https://opentelemetry.io/) client.
|
||||||
|
|
||||||
## Supported .NET Versions
|
## Supported .NET Versions
|
||||||
|
|
||||||
Packages shipped from this repository generally support all the officially
|
Packages shipped from this repository generally support all the officially
|
||||||
supported versions of [.NET
|
supported versions of [.NET
|
||||||
Core](https://dotnet.microsoft.com/download/dotnet-core), and [.NET
|
Core](https://dotnet.microsoft.com/download/dotnet-core), and [.NET
|
||||||
Framework](https://dotnet.microsoft.com/download/dotnet-framework) except for
|
Framework](https://dotnet.microsoft.com/download/dotnet-framework) except for
|
||||||
`.NET Framework 3.5 SP1`. Any exceptions to this are noted in the individual
|
`.NET Framework 3.5 SP1`. Any exceptions to this are noted in the individual
|
||||||
`README.md` files.
|
`README.md` files.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
If you are new here, please see [get started in 5
|
If you are new here, please see [get started in 5
|
||||||
minutes](./docs/trace/getting-started/README.md).
|
minutes](./docs/trace/getting-started/README.md).
|
||||||
|
|
||||||
This repository includes multiple installable components, available on
|
This repository includes multiple installable components, available on
|
||||||
[NuGet](https://www.nuget.org/profiles/OpenTelemetry). Each component has its
|
[NuGet](https://www.nuget.org/profiles/OpenTelemetry). Each component has its
|
||||||
individual `README.md` file, which covers the instruction on how to install and
|
individual `README.md` file, which covers the instruction on how to install and
|
||||||
how to get started. To find all the available components, please take a look at
|
how to get started. To find all the available components, please take a look at
|
||||||
the `src` folder.
|
the `src` folder.
|
||||||
|
|
||||||
Here are the most commonly used components:
|
Here are the most commonly used components:
|
||||||
|
|
||||||
* [OpenTelemetry .NET API](./src/OpenTelemetry.Api/README.md)
|
* [OpenTelemetry .NET API](./src/OpenTelemetry.Api/README.md)
|
||||||
* [OpenTelemetry .NET SDK](./src/OpenTelemetry/README.md)
|
* [OpenTelemetry .NET SDK](./src/OpenTelemetry/README.md)
|
||||||
|
|
||||||
Here are the [instrumentation
|
Here are the [instrumentation
|
||||||
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#instrumentation-library):
|
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#instrumentation-library):
|
||||||
|
|
||||||
* [ASP.NET](./src/OpenTelemetry.Instrumentation.AspNet/README.md)
|
* [ASP.NET](./src/OpenTelemetry.Instrumentation.AspNet/README.md)
|
||||||
* [ASP.NET Core](./src/OpenTelemetry.Instrumentation.AspNetCore/README.md)
|
* [ASP.NET Core](./src/OpenTelemetry.Instrumentation.AspNetCore/README.md)
|
||||||
* [gRPC client](./src/OpenTelemetry.Instrumentation.GrpcNetClient/README.md)
|
* [gRPC client](./src/OpenTelemetry.Instrumentation.GrpcNetClient/README.md)
|
||||||
* [HTTP clients](./src/OpenTelemetry.Instrumentation.Http/README.md)
|
* [HTTP clients](./src/OpenTelemetry.Instrumentation.Http/README.md)
|
||||||
* [Redis client](./src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md)
|
* [Redis client](./src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md)
|
||||||
* [SQL client](./src/OpenTelemetry.Instrumentation.SqlClient/README.md)
|
* [SQL client](./src/OpenTelemetry.Instrumentation.SqlClient/README.md)
|
||||||
|
|
||||||
Here are the [exporter
|
Here are the [exporter
|
||||||
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#exporter-library):
|
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#exporter-library):
|
||||||
|
|
||||||
* [Console](./src/OpenTelemetry.Exporter.Console/README.md)
|
* [Console](./src/OpenTelemetry.Exporter.Console/README.md)
|
||||||
* [Jaeger](./src/OpenTelemetry.Exporter.Jaeger/README.md)
|
* [Jaeger](./src/OpenTelemetry.Exporter.Jaeger/README.md)
|
||||||
* [OTLP](./src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md)
|
* [OTLP](./src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md)
|
||||||
(OpenTelemetry Protocol)
|
(OpenTelemetry Protocol)
|
||||||
* [Prometheus](./src/OpenTelemetry.Exporter.Prometheus/README.md)
|
* [Prometheus](./src/OpenTelemetry.Exporter.Prometheus/README.md)
|
||||||
* [Zipkin](./src/OpenTelemetry.Exporter.Zipkin/README.md)
|
* [Zipkin](./src/OpenTelemetry.Exporter.Zipkin/README.md)
|
||||||
|
|
||||||
See the [OpenTelemetry registry](https://opentelemetry.io/registry/?s=net) for
|
See the [OpenTelemetry registry](https://opentelemetry.io/registry/?s=net) for
|
||||||
more exporters.
|
more exporters.
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
OpenTelemetry .NET is designed to be customizable and extensible. Here are the
|
OpenTelemetry .NET is designed to be customizable and extensible. Here are the
|
||||||
most common customization and extension scenarios:
|
most common customization and extension scenarios:
|
||||||
|
|
||||||
* [Building a custom instrumentation
|
* [Building a custom instrumentation
|
||||||
library](./docs/trace/extending-the-sdk/README.md#instrumentation-library)
|
library](./docs/trace/extending-the-sdk/README.md#instrumentation-library)
|
||||||
* [Building a custom trace
|
* [Building a custom trace
|
||||||
exporter/processor/sampler](./docs/trace/extending-the-sdk/README.md)
|
exporter/processor/sampler](./docs/trace/extending-the-sdk/README.md)
|
||||||
* [Correlating logs with traces](./docs/logs/correlation/README.md)
|
* [Correlating logs with traces](./docs/logs/correlation/README.md)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||||
|
|
||||||
We meet weekly on Tuesdays, and the time of the meeting alternates between 11AM
|
We meet weekly on Tuesdays, and the time of the meeting alternates between 11AM
|
||||||
PT and 4PM PT. The meeting is subject to change depending on contributors'
|
PT and 4PM PT. The meeting is subject to change depending on contributors'
|
||||||
availability. Check the [OpenTelemetry community
|
availability. Check the [OpenTelemetry community
|
||||||
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
|
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
|
||||||
for specific dates.
|
for specific dates.
|
||||||
|
|
||||||
Meetings take place via [Zoom video conference](https://zoom.us/j/8287234601).
|
Meetings take place via [Zoom video conference](https://zoom.us/j/8287234601).
|
||||||
|
|
||||||
Meeting notes are available as a public [Google
|
Meeting notes are available as a public [Google
|
||||||
doc](https://docs.google.com/document/d/1yjjD6aBcLxlRazYrawukDgrhZMObwHARJbB9glWdHj8/edit?usp=sharing).
|
doc](https://docs.google.com/document/d/1yjjD6aBcLxlRazYrawukDgrhZMObwHARJbB9glWdHj8/edit?usp=sharing).
|
||||||
For edit access, get in touch on
|
For edit access, get in touch on
|
||||||
[Gitter](https://gitter.im/open-telemetry/opentelemetry-dotnet).
|
[Gitter](https://gitter.im/open-telemetry/opentelemetry-dotnet).
|
||||||
|
|
||||||
Approvers
|
Approvers
|
||||||
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
|
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
|
||||||
|
|
||||||
* [Bruno Garcia](https://github.com/bruno-garcia), Sentry
|
* [Bruno Garcia](https://github.com/bruno-garcia), Sentry
|
||||||
* [Christoph Neumueller](https://github.com/discostu105), Dynatrace
|
* [Christoph Neumueller](https://github.com/discostu105), Dynatrace
|
||||||
* [Liudmila Molkova](https://github.com/lmolkova), Microsoft
|
* [Liudmila Molkova](https://github.com/lmolkova), Microsoft
|
||||||
* [Paulo Janotti](https://github.com/pjanotti), Splunk
|
* [Paulo Janotti](https://github.com/pjanotti), Splunk
|
||||||
* [Reiley Yang](https://github.com/reyang), Microsoft
|
* [Reiley Yang](https://github.com/reyang), Microsoft
|
||||||
|
|
||||||
*Find more about the approver role in [community
|
*Find more about the approver role in [community
|
||||||
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
|
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
|
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
|
||||||
|
|
||||||
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
|
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
|
||||||
* [Mike Goldsmith](https://github.com/MikeGoldsmith), Honeycomb
|
* [Mike Goldsmith](https://github.com/MikeGoldsmith), Honeycomb
|
||||||
* [Mikel Blanchard](https://github.com/CodeBlanch), CoStar Group
|
* [Mikel Blanchard](https://github.com/CodeBlanch), CoStar Group
|
||||||
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev), Google
|
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev), Google
|
||||||
|
|
||||||
*Find more about the maintainer role in [community
|
*Find more about the maintainer role in [community
|
||||||
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
|
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
|
||||||
|
|
||||||
### Thanks to all the people who have contributed
|
### Thanks to all the people who have contributed
|
||||||
|
|
||||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
|
[](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
|
||||||
|
|
||||||
## Release Schedule
|
## Release Schedule
|
||||||
|
|
||||||
OpenTelemetry .NET is under active development.
|
OpenTelemetry .NET is under active development.
|
||||||
|
|
||||||
The library is not yet _generally available_, and releases aren't guaranteed to
|
The library is not yet _generally available_, and releases aren't guaranteed to
|
||||||
conform to a specific version of the specification. Future releases will not
|
conform to a specific version of the specification. Future releases will not
|
||||||
attempt to maintain backwards compatibility with previous releases. Each alpha
|
attempt to maintain backwards compatibility with previous releases. Each alpha
|
||||||
and beta release includes significant changes to the API and SDK packages,
|
and beta release includes significant changes to the API and SDK packages,
|
||||||
making them incompatible with each other.
|
making them incompatible with each other.
|
||||||
|
|
||||||
See the [release
|
See the [release
|
||||||
notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) for
|
notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) for
|
||||||
existing releases.
|
existing releases.
|
||||||
|
|
||||||
See the [project
|
See the [project
|
||||||
milestones](https://github.com/open-telemetry/opentelemetry-dotnet/milestones)
|
milestones](https://github.com/open-telemetry/opentelemetry-dotnet/milestones)
|
||||||
for details on upcoming releases. The dates and features described in issues
|
for details on upcoming releases. The dates and features described in issues
|
||||||
and milestones are estimates, and subject to change.
|
and milestones are estimates, and subject to change.
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ retval += sanitycheck('**/*.cshtml', allow_utf8 = True, allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.csproj', allow_utf8 = True, allow_eol = (LF,))
|
retval += sanitycheck('**/*.csproj', allow_utf8 = True, allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.htm', allow_eol = (LF,))
|
retval += sanitycheck('**/*.htm', allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.html', allow_eol = (LF,))
|
retval += sanitycheck('**/*.html', allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.md')
|
retval += sanitycheck('**/*.md', allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.proj', allow_eol = (LF,))
|
retval += sanitycheck('**/*.proj', allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.props', allow_eol = (LF,))
|
retval += sanitycheck('**/*.props', allow_eol = (LF,))
|
||||||
retval += sanitycheck('**/*.py', allow_eol = (LF,))
|
retval += sanitycheck('**/*.py', allow_eol = (LF,))
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,30 @@
|
||||||
# Console Exporter for OpenTelemetry .NET
|
# Console Exporter for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
|
||||||
|
|
||||||
The console exporter prints data to the Console in a JSON serialized format.
|
The console exporter prints data to the Console in a JSON serialized format.
|
||||||
|
|
||||||
**Note:** this exporter is intended to be used during learning how telemetry
|
**Note:** this exporter is intended to be used during learning how telemetry
|
||||||
data are created and exported. It is not recommended for any production
|
data are created and exported. It is not recommended for any production
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Exporter.Console
|
dotnet add package OpenTelemetry.Exporter.Console
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the `ConsoleExporter` by following the directions below:
|
You can configure the `ConsoleExporter` by following the directions below:
|
||||||
|
|
||||||
* `DisplayAsJson`: Boolean to show data as JSON.
|
* `DisplayAsJson`: Boolean to show data as JSON.
|
||||||
|
|
||||||
See the
|
See the
|
||||||
[`TestConsoleExporter.cs`](../../examples/Console/TestConsoleExporter.cs)
|
[`TestConsoleExporter.cs`](../../examples/Console/TestConsoleExporter.cs)
|
||||||
for an example of how to use the exporter.
|
for an example of how to use the exporter.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,45 @@
|
||||||
# Jaeger Exporter for OpenTelemetry .NET
|
# Jaeger Exporter for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
|
||||||
|
|
||||||
The Jaeger exporter communicates to a Jaeger Agent through the compact thrift
|
The Jaeger exporter communicates to a Jaeger Agent through the compact thrift
|
||||||
protocol on the Compact Thrift API port.
|
protocol on the Compact Thrift API port.
|
||||||
|
|
||||||
## Supported .NET Versions
|
## Supported .NET Versions
|
||||||
|
|
||||||
This package supports all the officially supported versions of [.NET
|
This package supports all the officially supported versions of [.NET
|
||||||
Core](https://dotnet.microsoft.com/download/dotnet-core).
|
Core](https://dotnet.microsoft.com/download/dotnet-core).
|
||||||
|
|
||||||
For .NET Framework, versions 4.6 and above are supported.
|
For .NET Framework, versions 4.6 and above are supported.
|
||||||
|
|
||||||
## Prerequisite
|
## Prerequisite
|
||||||
|
|
||||||
* [Get Jaeger](https://www.jaegertracing.io/docs/1.13/getting-started/)
|
* [Get Jaeger](https://www.jaegertracing.io/docs/1.13/getting-started/)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Exporter.Jaeger
|
dotnet add package OpenTelemetry.Exporter.Jaeger
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the `JaegerExporter` by following the directions below:
|
You can configure the `JaegerExporter` by following the directions below:
|
||||||
|
|
||||||
* `ServiceName`: The name of your application or service.
|
* `ServiceName`: The name of your application or service.
|
||||||
* `AgentHost`: Usually `localhost` since an agent should usually be running on
|
* `AgentHost`: Usually `localhost` since an agent should usually be running on
|
||||||
the same machine as your application or service.
|
the same machine as your application or service.
|
||||||
* `AgentPort`: The compact thrift protocol port of the Jaeger Agent (default
|
* `AgentPort`: The compact thrift protocol port of the Jaeger Agent (default
|
||||||
`6831`).
|
`6831`).
|
||||||
* `MaxPacketSize`: The maximum size of each UDP packet that gets sent to the
|
* `MaxPacketSize`: The maximum size of each UDP packet that gets sent to the
|
||||||
agent. (default `65000`).
|
agent. (default `65000`).
|
||||||
|
|
||||||
See the
|
See the
|
||||||
[`TestJaegerExporter.cs`](../../examples/Console/TestJaegerExporter.cs)
|
[`TestJaegerExporter.cs`](../../examples/Console/TestJaegerExporter.cs)
|
||||||
for an example of how to use the exporter.
|
for an example of how to use the exporter.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [Jaeger](https://www.jaegertracing.io)
|
* [Jaeger](https://www.jaegertracing.io)
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# OpenTelemetry Protocol Implementation
|
# OpenTelemetry Protocol Implementation
|
||||||
|
|
||||||
`.proto` files under `Implementation\` are copied from the
|
`.proto` files under `Implementation\` are copied from the
|
||||||
[`opentelemetry-proto`](https://github.com/open-telemetry/opentelemetry-proto/commit/1a931b4b57c34e7fd8f7dddcaa9b7587840e9c08)
|
[`opentelemetry-proto`](https://github.com/open-telemetry/opentelemetry-proto/commit/1a931b4b57c34e7fd8f7dddcaa9b7587840e9c08)
|
||||||
repo.
|
repo.
|
||||||
|
|
||||||
Trace proto files marked as stable.
|
Trace proto files marked as stable.
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,37 @@
|
||||||
# OTLP Exporter for OpenTelemetry .NET
|
# OTLP Exporter for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
|
||||||
|
|
||||||
The OTLP (OpenTelemetry Protocol) exporter communicates to an OpenTelemetry
|
The OTLP (OpenTelemetry Protocol) exporter communicates to an OpenTelemetry
|
||||||
Collector through a gRPC protocol.
|
Collector through a gRPC protocol.
|
||||||
|
|
||||||
## Prerequisite
|
## Prerequisite
|
||||||
|
|
||||||
* [Get OpenTelemetry Collector](https://opentelemetry.io/docs/collector/about/)
|
* [Get OpenTelemetry Collector](https://opentelemetry.io/docs/collector/about/)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol
|
dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the `OtlpExporter` by following the directions below:
|
You can configure the `OtlpExporter` by following the directions below:
|
||||||
|
|
||||||
* `Endpoint`: Target to which the exporter is going to send traces or metrics.
|
* `Endpoint`: Target to which the exporter is going to send traces or metrics.
|
||||||
* `Credentials`: Client-side channel credentials.
|
* `Credentials`: Client-side channel credentials.
|
||||||
* `Headers`: Optional headers for the connection.
|
* `Headers`: Optional headers for the connection.
|
||||||
|
|
||||||
See the
|
See the
|
||||||
[`TestOtlpExporter.cs`](../../examples/Console/TestOtlpExporter.cs)
|
[`TestOtlpExporter.cs`](../../examples/Console/TestOtlpExporter.cs)
|
||||||
for an example of how to use the exporter.
|
for an example of how to use the exporter.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry
|
* [OpenTelemetry
|
||||||
Collector](https://github.com/open-telemetry/opentelemetry-collector)
|
Collector](https://github.com/open-telemetry/opentelemetry-collector)
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
* [OpenTelemetry
|
* [OpenTelemetry
|
||||||
Protocol](https://github.com/open-telemetry/opentelemetry-proto)
|
Protocol](https://github.com/open-telemetry/opentelemetry-proto)
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,29 @@
|
||||||
# Prometheus Exporter for OpenTelemetry .NET
|
# Prometheus Exporter for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
|
||||||
|
|
||||||
## Prerequisite
|
## Prerequisite
|
||||||
|
|
||||||
* [Get Prometheus](https://prometheus.io/docs/introduction/first_steps/)
|
* [Get Prometheus](https://prometheus.io/docs/introduction/first_steps/)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Exporter.Prometheus
|
dotnet add package OpenTelemetry.Exporter.Prometheus
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the `PrometheusExporter` by following the directions below:
|
You can configure the `PrometheusExporter` by following the directions below:
|
||||||
|
|
||||||
* `Url`: The url to listen to. Typically it ends with `/metrics` like `http://localhost:9184/metrics/`.
|
* `Url`: The url to listen to. Typically it ends with `/metrics` like `http://localhost:9184/metrics/`.
|
||||||
|
|
||||||
See
|
See
|
||||||
[`TestPrometheusExporter.cs`](../../examples/Console/TestPrometheusExporter.cs)
|
[`TestPrometheusExporter.cs`](../../examples/Console/TestPrometheusExporter.cs)
|
||||||
for example use.
|
for example use.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
* [Prometheus](https://prometheus.io)
|
* [Prometheus](https://prometheus.io)
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
# ZPages Exporter for OpenTelemetry .NET
|
# ZPages Exporter for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Exporter.ZPages
|
dotnet add package OpenTelemetry.Exporter.ZPages
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the `ZPagesExporter` by following the directions below:
|
You can configure the `ZPagesExporter` by following the directions below:
|
||||||
|
|
||||||
* `Url`: The url to listen to. Typically it ends with `/rpcz` like `http://localhost:7284/rpcz/`.
|
* `Url`: The url to listen to. Typically it ends with `/rpcz` like `http://localhost:7284/rpcz/`.
|
||||||
* `RetentionTime`: The retention time (in milliseconds) for the metrics.
|
* `RetentionTime`: The retention time (in milliseconds) for the metrics.
|
||||||
|
|
||||||
See the
|
See the
|
||||||
[`TestZPagesExporter.cs`](../../examples/Console/TestZPagesExporter.cs)
|
[`TestZPagesExporter.cs`](../../examples/Console/TestZPagesExporter.cs)
|
||||||
for an example of how to use the exporter.
|
for an example of how to use the exporter.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
* [zPages](https://opencensus.io/zpages/)
|
* [zPages](https://opencensus.io/zpages/)
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,32 @@
|
||||||
# Zipkin Exporter for OpenTelemetry .NET
|
# Zipkin Exporter for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
|
[](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
|
||||||
|
|
||||||
## Prerequisite
|
## Prerequisite
|
||||||
|
|
||||||
* [Get Zipkin](https://zipkin.io/pages/quickstart.html)
|
* [Get Zipkin](https://zipkin.io/pages/quickstart.html)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Exporter.Zipkin
|
dotnet add package OpenTelemetry.Exporter.Zipkin
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the `ZipkinExporter` by following the directions below:
|
You can configure the `ZipkinExporter` by following the directions below:
|
||||||
|
|
||||||
* `Endpoint`: Zipkin endpoint address.
|
* `Endpoint`: Zipkin endpoint address.
|
||||||
* `TimeoutSeconds`: Timeout in seconds.
|
* `TimeoutSeconds`: Timeout in seconds.
|
||||||
* `ServiceName`: Name of the service reporting telemetry.
|
* `ServiceName`: Name of the service reporting telemetry.
|
||||||
* `UseShortTraceIds`: Value indicating whether short trace id should be used.
|
* `UseShortTraceIds`: Value indicating whether short trace id should be used.
|
||||||
|
|
||||||
See
|
See
|
||||||
[`TestZipkinExporter.cs`](../../examples/Console/TestZipkinExporter.cs)
|
[`TestZipkinExporter.cs`](../../examples/Console/TestZipkinExporter.cs)
|
||||||
for example use.
|
for example use.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
* [Zipkin](https://zipkin.io)
|
* [Zipkin](https://zipkin.io)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# OpenTelemetry.Extensions.Hosting
|
# OpenTelemetry.Extensions.Hosting
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
|
[](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
|
[](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Extensions.Hosting
|
dotnet add package OpenTelemetry.Extensions.Hosting
|
||||||
```
|
```
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
|
|
|
||||||
|
|
@ -1,155 +1,155 @@
|
||||||
# ASP.NET Core Instrumentation for OpenTelemetry .NET
|
# ASP.NET Core Instrumentation for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
|
[](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
|
[](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
|
||||||
|
|
||||||
This is an [Instrumentation
|
This is an [Instrumentation
|
||||||
Library](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#instrumentation-library),
|
Library](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#instrumentation-library),
|
||||||
which instruments [ASP.NET Core](https://docs.microsoft.com/aspnet/core) and
|
which instruments [ASP.NET Core](https://docs.microsoft.com/aspnet/core) and
|
||||||
collect telemetry about incoming web requests.
|
collect telemetry about incoming web requests.
|
||||||
This instrumentation also collects incoming gRPC requests using
|
This instrumentation also collects incoming gRPC requests using
|
||||||
[Grpc.AspNetCore](https://www.nuget.org/packages/Grpc.AspNetCore).
|
[Grpc.AspNetCore](https://www.nuget.org/packages/Grpc.AspNetCore).
|
||||||
|
|
||||||
## Steps to enable OpenTelemetry.Instrumentation.AspNetCore
|
## Steps to enable OpenTelemetry.Instrumentation.AspNetCore
|
||||||
|
|
||||||
### Step 1: Install Package
|
### Step 1: Install Package
|
||||||
|
|
||||||
Add a reference to the
|
Add a reference to the
|
||||||
[`OpenTelemetry.Instrumentation.AspNetCore`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
|
[`OpenTelemetry.Instrumentation.AspNetCore`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
|
||||||
package. Also, add any other instrumentations & exporters you will need.
|
package. Also, add any other instrumentations & exporters you will need.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Instrumentation.AspNetCore
|
dotnet add package OpenTelemetry.Instrumentation.AspNetCore
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Enable ASP.NET Core Instrumentation at application startup
|
### Step 2: Enable ASP.NET Core Instrumentation at application startup
|
||||||
|
|
||||||
ASP.NET Core instrumentation must be enabled at application startup. This is
|
ASP.NET Core instrumentation must be enabled at application startup. This is
|
||||||
typically done in the `ConfigureServices` of your `Startup` class. The example
|
typically done in the `ConfigureServices` of your `Startup` class. The example
|
||||||
below enables this instrumentation by using an extension method on
|
below enables this instrumentation by using an extension method on
|
||||||
`IServiceCollection`. This extension method requires adding the package
|
`IServiceCollection`. This extension method requires adding the package
|
||||||
[`OpenTelemetry.Extensions.Hosting`](../OpenTelemetry.Extensions.Hosting/README.md)
|
[`OpenTelemetry.Extensions.Hosting`](../OpenTelemetry.Extensions.Hosting/README.md)
|
||||||
to the application. This ensures the instrumentation is disposed when the host
|
to the application. This ensures the instrumentation is disposed when the host
|
||||||
is shutdown.
|
is shutdown.
|
||||||
|
|
||||||
Additionally, this examples sets up the OpenTelemetry Jaeger exporter, which
|
Additionally, this examples sets up the OpenTelemetry Jaeger exporter, which
|
||||||
requires adding the package
|
requires adding the package
|
||||||
[`OpenTelemetry.Exporter.Jaeger`](../OpenTelemetry.Exporter.Jaeger/README.md) to
|
[`OpenTelemetry.Exporter.Jaeger`](../OpenTelemetry.Exporter.Jaeger/README.md) to
|
||||||
the application.
|
the application.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddOpenTelemetryTracing(
|
services.AddOpenTelemetryTracing(
|
||||||
(builder) => builder
|
(builder) => builder
|
||||||
.AddAspNetCoreInstrumentation()
|
.AddAspNetCoreInstrumentation()
|
||||||
.AddJaegerExporter()
|
.AddJaegerExporter()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced configuration
|
## Advanced configuration
|
||||||
|
|
||||||
This instrumentation can be configured to change the default behavior by using
|
This instrumentation can be configured to change the default behavior by using
|
||||||
`AspNetCoreInstrumentationOptions`, which allows configuring
|
`AspNetCoreInstrumentationOptions`, which allows configuring
|
||||||
[`Propagator`](#propagator) and [`Filter`](#filter) as explained below.
|
[`Propagator`](#propagator) and [`Filter`](#filter) as explained below.
|
||||||
|
|
||||||
### Propagator
|
### Propagator
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
### Filter
|
### Filter
|
||||||
|
|
||||||
This instrumentation by default collects all the incoming http requests. It
|
This instrumentation by default collects all the incoming http requests. It
|
||||||
allows filtering of requests by using `Filter` function in
|
allows filtering of requests by using `Filter` function in
|
||||||
`AspNetCoreInstrumentationOptions`. This can be used to filter out any requests
|
`AspNetCoreInstrumentationOptions`. This can be used to filter out any requests
|
||||||
based on some condition. The Filter receives the `HttpContext` of the incoming
|
based on some condition. The Filter receives the `HttpContext` of the incoming
|
||||||
request, and filters out the request if the Filter returns false or throws
|
request, and filters out the request if the Filter returns false or throws
|
||||||
exception.
|
exception.
|
||||||
|
|
||||||
The following shows an example of `Filter` being used to filter out all POST
|
The following shows an example of `Filter` being used to filter out all POST
|
||||||
requests.
|
requests.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
services.AddOpenTelemetryTracing(
|
services.AddOpenTelemetryTracing(
|
||||||
(builder) => builder
|
(builder) => builder
|
||||||
.AddAspNetCoreInstrumentation(
|
.AddAspNetCoreInstrumentation(
|
||||||
opt => opt.Filter =
|
opt => opt.Filter =
|
||||||
(httpContext) =>
|
(httpContext) =>
|
||||||
{
|
{
|
||||||
// filter out all HTTP POST requests.
|
// filter out all HTTP POST requests.
|
||||||
return !httpContext.Request.Method.Equals("POST");
|
return !httpContext.Request.Method.Equals("POST");
|
||||||
})
|
})
|
||||||
.AddJaegerExporter()
|
.AddJaegerExporter()
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
It is important to note that this `Filter` option is specific to this
|
It is important to note that this `Filter` option is specific to this
|
||||||
instrumentation. OpenTelemetry has a concept of
|
instrumentation. OpenTelemetry has a concept of
|
||||||
[Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampling),
|
[Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampling),
|
||||||
and the `Filter` option does the filtering *before* the Sampler is invoked.
|
and the `Filter` option does the filtering *before* the Sampler is invoked.
|
||||||
|
|
||||||
### Special topic - Enriching automatically collected telemetry
|
### Special topic - Enriching automatically collected telemetry
|
||||||
|
|
||||||
This instrumentation library stores the raw `HttpRequest`, `HttpResponse`
|
This instrumentation library stores the raw `HttpRequest`, `HttpResponse`
|
||||||
objects in the activity. This can be accessed in ActivityProcessors, and can be
|
objects in the activity. This can be accessed in ActivityProcessors, and can be
|
||||||
used to further enrich the Activity with additional tags as shown below.
|
used to further enrich the Activity with additional tags as shown below.
|
||||||
|
|
||||||
The key name for HttpRequest custom property inside Activity is
|
The key name for HttpRequest custom property inside Activity is
|
||||||
"OTel.AspNetCore.Request".
|
"OTel.AspNetCore.Request".
|
||||||
|
|
||||||
The key name for HttpResponse custom property inside
|
The key name for HttpResponse custom property inside
|
||||||
Activity is "OTel.AspNetCore.Response".
|
Activity is "OTel.AspNetCore.Response".
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
internal class MyAspNetCoreEnrichingProcessor : ActivityProcessor
|
internal class MyAspNetCoreEnrichingProcessor : ActivityProcessor
|
||||||
{
|
{
|
||||||
public override void OnStart(Activity activity)
|
public override void OnStart(Activity activity)
|
||||||
{
|
{
|
||||||
// Retrieve the HttpRequest object.
|
// Retrieve the HttpRequest object.
|
||||||
var httpRequest = activity.GetCustomProperty("OTel.AspNetCore.Request")
|
var httpRequest = activity.GetCustomProperty("OTel.AspNetCore.Request")
|
||||||
as HttpRequest;
|
as HttpRequest;
|
||||||
if (httpRequest != null)
|
if (httpRequest != null)
|
||||||
{
|
{
|
||||||
// Add more tags to the activity
|
// Add more tags to the activity
|
||||||
activity.SetTag("mycustomtag", httpRequest.Headers["myheader"]);
|
activity.SetTag("mycustomtag", httpRequest.Headers["myheader"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEnd(Activity activity)
|
public override void OnEnd(Activity activity)
|
||||||
{
|
{
|
||||||
// Retrieve the HttpResponse object.
|
// Retrieve the HttpResponse object.
|
||||||
var httpResponse = activity.GetCustomProperty("OTel.AspNetCore.Response")
|
var httpResponse = activity.GetCustomProperty("OTel.AspNetCore.Response")
|
||||||
as HttpResponse;
|
as HttpResponse;
|
||||||
if (httpResponse != null)
|
if (httpResponse != null)
|
||||||
{
|
{
|
||||||
var statusCode = httpResponse.StatusCode;
|
var statusCode = httpResponse.StatusCode;
|
||||||
bool success = statusCode < 400;
|
bool success = statusCode < 400;
|
||||||
// Add more tags to the activity or replace an existing tag.
|
// Add more tags to the activity or replace an existing tag.
|
||||||
activity.SetTag("myCustomSuccess", success);
|
activity.SetTag("myCustomSuccess", success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The custom processor must be added to the provider as below. It is important to
|
The custom processor must be added to the provider as below. It is important to
|
||||||
add the enrichment processor before any exporters so that exporters see the
|
add the enrichment processor before any exporters so that exporters see the
|
||||||
changes done by them.
|
changes done by them.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
services.AddOpenTelemetryTracing(
|
services.AddOpenTelemetryTracing(
|
||||||
(builder) => builder
|
(builder) => builder
|
||||||
.AddAspNetCoreInstrumentation()
|
.AddAspNetCoreInstrumentation()
|
||||||
.AddProcessor(new MyAspNetCoreEnrichingProcessor())
|
.AddProcessor(new MyAspNetCoreEnrichingProcessor())
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [Introduction to ASP.NET
|
* [Introduction to ASP.NET
|
||||||
Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core)
|
Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core)
|
||||||
* [gRPC services using ASP.NET Core](https://docs.microsoft.com/aspnet/core/grpc/aspnetcore)
|
* [gRPC services using ASP.NET Core](https://docs.microsoft.com/aspnet/core/grpc/aspnetcore)
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
# OpenTracing Shim for OpenTelemetry .NET
|
# OpenTracing Shim for OpenTelemetry .NET
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
|
[](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
|
[](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry.Shims.OpenTracing
|
dotnet add package OpenTelemetry.Shims.OpenTracing
|
||||||
```
|
```
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
* [OpenTracing](https://opentracing.io)
|
* [OpenTracing](https://opentracing.io)
|
||||||
|
|
|
||||||
|
|
@ -1,89 +1,89 @@
|
||||||
# OpenTelemetry .NET SDK
|
# OpenTelemetry .NET SDK
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry)
|
[](https://www.nuget.org/packages/OpenTelemetry)
|
||||||
[](https://www.nuget.org/packages/OpenTelemetry)
|
[](https://www.nuget.org/packages/OpenTelemetry)
|
||||||
|
|
||||||
* [Installation](#installation)
|
* [Installation](#installation)
|
||||||
* [Introduction](#introduction)
|
* [Introduction](#introduction)
|
||||||
* [Getting started](#getting-started)
|
* [Getting started](#getting-started)
|
||||||
* [Configuration](#configuration)
|
* [Configuration](#configuration)
|
||||||
* [Instrumentation](#instrumentation)
|
* [Instrumentation](#instrumentation)
|
||||||
* [Processor](#processor)
|
* [Processor](#processor)
|
||||||
* [Resource](#resource)
|
* [Resource](#resource)
|
||||||
* [Sampler](#sampler)
|
* [Sampler](#sampler)
|
||||||
* [Advanced topics](#advanced-topics)
|
* [Advanced topics](#advanced-topics)
|
||||||
* [References](#references)
|
* [References](#references)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dotnet add package OpenTelemetry
|
dotnet add package OpenTelemetry
|
||||||
```
|
```
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
OpenTelemetry SDK is a reference implementation of the OpenTelemetry API. It
|
OpenTelemetry SDK is a reference implementation of the OpenTelemetry API. It
|
||||||
implements the Tracing API, the Metrics API, and the Context API. OpenTelemetry
|
implements the Tracing API, the Metrics API, and the Context API. OpenTelemetry
|
||||||
SDK deals with concerns such as sampling, processing pipeline, exporting
|
SDK deals with concerns such as sampling, processing pipeline, exporting
|
||||||
telemetry to a particular backend etc. The default implementation consists of
|
telemetry to a particular backend etc. The default implementation consists of
|
||||||
the following.
|
the following.
|
||||||
|
|
||||||
* Set of [Built-in
|
* Set of [Built-in
|
||||||
samplers](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-samplers)
|
samplers](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-samplers)
|
||||||
* Set of [Built-in
|
* Set of [Built-in
|
||||||
processors](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-span-processors).
|
processors](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-span-processors).
|
||||||
* SimpleProcessor which sends Activities to the exporter without any
|
* SimpleProcessor which sends Activities to the exporter without any
|
||||||
batching.
|
batching.
|
||||||
* BatchingProcessor which batches and sends Activities to the exporter.
|
* BatchingProcessor which batches and sends Activities to the exporter.
|
||||||
* Extensibility options for users to customize SDK.
|
* Extensibility options for users to customize SDK.
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
Please follow the tutorial and [get started in 5
|
Please follow the tutorial and [get started in 5
|
||||||
minutes](../../docs/trace/getting-started/README.md).
|
minutes](../../docs/trace/getting-started/README.md).
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Instrumentation
|
### Instrumentation
|
||||||
|
|
||||||
### Processor
|
### Processor
|
||||||
|
|
||||||
### Resource
|
### Resource
|
||||||
|
|
||||||
### Sampler
|
### Sampler
|
||||||
|
|
||||||
[Samplers](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampler)
|
[Samplers](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampler)
|
||||||
are used to control the noise and overhead introduced by OpenTelemetry by
|
are used to control the noise and overhead introduced by OpenTelemetry by
|
||||||
reducing the number of samples of traces collected and sent to the backend. If
|
reducing the number of samples of traces collected and sent to the backend. If
|
||||||
no sampler is explicitly specified, the default is to use
|
no sampler is explicitly specified, the default is to use
|
||||||
[AlwaysOnSampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#alwayson).
|
[AlwaysOnSampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#alwayson).
|
||||||
The following example shows how to change it to
|
The following example shows how to change it to
|
||||||
[TraceIdRatioBasedSampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#traceidratiobased)
|
[TraceIdRatioBasedSampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#traceidratiobased)
|
||||||
with sampling probability of 25%.
|
with sampling probability of 25%.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
|
||||||
using var otel = Sdk.CreateTracerProvider(b => b
|
using var otel = Sdk.CreateTracerProvider(b => b
|
||||||
.AddActivitySource("MyCompany.MyProduct.MyLibrary")
|
.AddActivitySource("MyCompany.MyProduct.MyLibrary")
|
||||||
.SetSampler(new TraceIdRatioBasedSampler(0.25))
|
.SetSampler(new TraceIdRatioBasedSampler(0.25))
|
||||||
.UseConsoleExporter());
|
.UseConsoleExporter());
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced topics
|
## Advanced topics
|
||||||
|
|
||||||
* Logs
|
* Logs
|
||||||
* [Correlating logs with traces](../../docs/logs/correlation/README.md)
|
* [Correlating logs with traces](../../docs/logs/correlation/README.md)
|
||||||
* Metrics
|
* Metrics
|
||||||
* [Building your own Exporter](../../docs/metrics/building-your-own-exporter.md)
|
* [Building your own Exporter](../../docs/metrics/building-your-own-exporter.md)
|
||||||
* Trace
|
* Trace
|
||||||
* [Building your own Exporter](../../docs/trace/extending-the-sdk/README.md#exporter)
|
* [Building your own Exporter](../../docs/trace/extending-the-sdk/README.md#exporter)
|
||||||
* [Building your own Instrumentation
|
* [Building your own Instrumentation
|
||||||
Library](../../docs/trace/extending-the-sdk/README.md#instrumentation-library)
|
Library](../../docs/trace/extending-the-sdk/README.md#instrumentation-library)
|
||||||
* [Building your own Processor](../../docs/trace/extending-the-sdk/README.md#processor)
|
* [Building your own Processor](../../docs/trace/extending-the-sdk/README.md#processor)
|
||||||
* [Building your own Sampler](../../docs/trace/extending-the-sdk/README.md#sampler)
|
* [Building your own Sampler](../../docs/trace/extending-the-sdk/README.md#sampler)
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue