sanitize EOL for *.md files (#1257)

This commit is contained in:
Reiley Yang 2020-09-10 09:47:32 -07:00 committed by GitHub
parent 8b8731c3c8
commit a6795c224f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 613 additions and 613 deletions

266
README.md
View File

@ -1,133 +1,133 @@
# OpenTelemetry .NET
[![Gitter
chat](https://badges.gitter.im/open-telemetry/opentelemetry-dotnet.svg)](https://gitter.im/open-telemetry/opentelemetry-dotnet)
[![Build
Status](https://action-badges.now.sh/open-telemetry/opentelemetry-dotnet)](https://github.com/open-telemetry/opentelemetry-dotnet/actions)
[![Release](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-dotnet?include_prereleases&style=)](https://github.com/open-telemetry/opentelemetry-dotnet/releases/)
[![Nuget](https://img.shields.io/nuget/vpre/OpenTelemetry.svg)](https://www.nuget.org/profiles/OpenTelemetry)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.svg)](https://www.nuget.org/profiles/OpenTelemetry)
The .NET [OpenTelemetry](https://opentelemetry.io/) client.
## Supported .NET Versions
Packages shipped from this repository generally support all the officially
supported versions of [.NET
Core](https://dotnet.microsoft.com/download/dotnet-core), and [.NET
Framework](https://dotnet.microsoft.com/download/dotnet-framework) except for
`.NET Framework 3.5 SP1`. Any exceptions to this are noted in the individual
`README.md` files.
## Getting Started
If you are new here, please see [get started in 5
minutes](./docs/trace/getting-started/README.md).
This repository includes multiple installable components, available on
[NuGet](https://www.nuget.org/profiles/OpenTelemetry). Each component has its
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
the `src` folder.
Here are the most commonly used components:
* [OpenTelemetry .NET API](./src/OpenTelemetry.Api/README.md)
* [OpenTelemetry .NET SDK](./src/OpenTelemetry/README.md)
Here are the [instrumentation
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 Core](./src/OpenTelemetry.Instrumentation.AspNetCore/README.md)
* [gRPC client](./src/OpenTelemetry.Instrumentation.GrpcNetClient/README.md)
* [HTTP clients](./src/OpenTelemetry.Instrumentation.Http/README.md)
* [Redis client](./src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md)
* [SQL client](./src/OpenTelemetry.Instrumentation.SqlClient/README.md)
Here are the [exporter
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#exporter-library):
* [Console](./src/OpenTelemetry.Exporter.Console/README.md)
* [Jaeger](./src/OpenTelemetry.Exporter.Jaeger/README.md)
* [OTLP](./src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md)
(OpenTelemetry Protocol)
* [Prometheus](./src/OpenTelemetry.Exporter.Prometheus/README.md)
* [Zipkin](./src/OpenTelemetry.Exporter.Zipkin/README.md)
See the [OpenTelemetry registry](https://opentelemetry.io/registry/?s=net) for
more exporters.
## Customization
OpenTelemetry .NET is designed to be customizable and extensible. Here are the
most common customization and extension scenarios:
* [Building a custom instrumentation
library](./docs/trace/extending-the-sdk/README.md#instrumentation-library)
* [Building a custom trace
exporter/processor/sampler](./docs/trace/extending-the-sdk/README.md)
* [Correlating logs with traces](./docs/logs/correlation/README.md)
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
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'
availability. Check the [OpenTelemetry community
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
for specific dates.
Meetings take place via [Zoom video conference](https://zoom.us/j/8287234601).
Meeting notes are available as a public [Google
doc](https://docs.google.com/document/d/1yjjD6aBcLxlRazYrawukDgrhZMObwHARJbB9glWdHj8/edit?usp=sharing).
For edit access, get in touch on
[Gitter](https://gitter.im/open-telemetry/opentelemetry-dotnet).
Approvers
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
* [Bruno Garcia](https://github.com/bruno-garcia), Sentry
* [Christoph Neumueller](https://github.com/discostu105), Dynatrace
* [Liudmila Molkova](https://github.com/lmolkova), Microsoft
* [Paulo Janotti](https://github.com/pjanotti), Splunk
* [Reiley Yang](https://github.com/reyang), Microsoft
*Find more about the approver role in [community
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
Maintainers
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
* [Mike Goldsmith](https://github.com/MikeGoldsmith), Honeycomb
* [Mikel Blanchard](https://github.com/CodeBlanch), CoStar Group
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev), Google
*Find more about the maintainer role in [community
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
### Thanks to all the people who have contributed
[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-dotnet)](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
## Release Schedule
OpenTelemetry .NET is under active development.
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
attempt to maintain backwards compatibility with previous releases. Each alpha
and beta release includes significant changes to the API and SDK packages,
making them incompatible with each other.
See the [release
notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) for
existing releases.
See the [project
milestones](https://github.com/open-telemetry/opentelemetry-dotnet/milestones)
for details on upcoming releases. The dates and features described in issues
and milestones are estimates, and subject to change.
# OpenTelemetry .NET
[![Gitter
chat](https://badges.gitter.im/open-telemetry/opentelemetry-dotnet.svg)](https://gitter.im/open-telemetry/opentelemetry-dotnet)
[![Build
Status](https://action-badges.now.sh/open-telemetry/opentelemetry-dotnet)](https://github.com/open-telemetry/opentelemetry-dotnet/actions)
[![Release](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-dotnet?include_prereleases&style=)](https://github.com/open-telemetry/opentelemetry-dotnet/releases/)
[![Nuget](https://img.shields.io/nuget/vpre/OpenTelemetry.svg)](https://www.nuget.org/profiles/OpenTelemetry)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.svg)](https://www.nuget.org/profiles/OpenTelemetry)
The .NET [OpenTelemetry](https://opentelemetry.io/) client.
## Supported .NET Versions
Packages shipped from this repository generally support all the officially
supported versions of [.NET
Core](https://dotnet.microsoft.com/download/dotnet-core), and [.NET
Framework](https://dotnet.microsoft.com/download/dotnet-framework) except for
`.NET Framework 3.5 SP1`. Any exceptions to this are noted in the individual
`README.md` files.
## Getting Started
If you are new here, please see [get started in 5
minutes](./docs/trace/getting-started/README.md).
This repository includes multiple installable components, available on
[NuGet](https://www.nuget.org/profiles/OpenTelemetry). Each component has its
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
the `src` folder.
Here are the most commonly used components:
* [OpenTelemetry .NET API](./src/OpenTelemetry.Api/README.md)
* [OpenTelemetry .NET SDK](./src/OpenTelemetry/README.md)
Here are the [instrumentation
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 Core](./src/OpenTelemetry.Instrumentation.AspNetCore/README.md)
* [gRPC client](./src/OpenTelemetry.Instrumentation.GrpcNetClient/README.md)
* [HTTP clients](./src/OpenTelemetry.Instrumentation.Http/README.md)
* [Redis client](./src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md)
* [SQL client](./src/OpenTelemetry.Instrumentation.SqlClient/README.md)
Here are the [exporter
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#exporter-library):
* [Console](./src/OpenTelemetry.Exporter.Console/README.md)
* [Jaeger](./src/OpenTelemetry.Exporter.Jaeger/README.md)
* [OTLP](./src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md)
(OpenTelemetry Protocol)
* [Prometheus](./src/OpenTelemetry.Exporter.Prometheus/README.md)
* [Zipkin](./src/OpenTelemetry.Exporter.Zipkin/README.md)
See the [OpenTelemetry registry](https://opentelemetry.io/registry/?s=net) for
more exporters.
## Customization
OpenTelemetry .NET is designed to be customizable and extensible. Here are the
most common customization and extension scenarios:
* [Building a custom instrumentation
library](./docs/trace/extending-the-sdk/README.md#instrumentation-library)
* [Building a custom trace
exporter/processor/sampler](./docs/trace/extending-the-sdk/README.md)
* [Correlating logs with traces](./docs/logs/correlation/README.md)
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
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'
availability. Check the [OpenTelemetry community
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
for specific dates.
Meetings take place via [Zoom video conference](https://zoom.us/j/8287234601).
Meeting notes are available as a public [Google
doc](https://docs.google.com/document/d/1yjjD6aBcLxlRazYrawukDgrhZMObwHARJbB9glWdHj8/edit?usp=sharing).
For edit access, get in touch on
[Gitter](https://gitter.im/open-telemetry/opentelemetry-dotnet).
Approvers
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
* [Bruno Garcia](https://github.com/bruno-garcia), Sentry
* [Christoph Neumueller](https://github.com/discostu105), Dynatrace
* [Liudmila Molkova](https://github.com/lmolkova), Microsoft
* [Paulo Janotti](https://github.com/pjanotti), Splunk
* [Reiley Yang](https://github.com/reyang), Microsoft
*Find more about the approver role in [community
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
Maintainers
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
* [Mike Goldsmith](https://github.com/MikeGoldsmith), Honeycomb
* [Mikel Blanchard](https://github.com/CodeBlanch), CoStar Group
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev), Google
*Find more about the maintainer role in [community
repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
### Thanks to all the people who have contributed
[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-dotnet)](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
## Release Schedule
OpenTelemetry .NET is under active development.
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
attempt to maintain backwards compatibility with previous releases. Each alpha
and beta release includes significant changes to the API and SDK packages,
making them incompatible with each other.
See the [release
notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) for
existing releases.
See the [project
milestones](https://github.com/open-telemetry/opentelemetry-dotnet/milestones)
for details on upcoming releases. The dates and features described in issues
and milestones are estimates, and subject to change.

View File

@ -69,7 +69,7 @@ retval += sanitycheck('**/*.cshtml', allow_utf8 = True, allow_eol = (LF,))
retval += sanitycheck('**/*.csproj', allow_utf8 = True, allow_eol = (LF,))
retval += sanitycheck('**/*.htm', 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('**/*.props', allow_eol = (LF,))
retval += sanitycheck('**/*.py', allow_eol = (LF,))

View File

@ -1,30 +1,30 @@
# Console Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Console.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Console.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
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
data are created and exported. It is not recommended for any production
environment.
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Console
```
## Configuration
You can configure the `ConsoleExporter` by following the directions below:
* `DisplayAsJson`: Boolean to show data as JSON.
See the
[`TestConsoleExporter.cs`](../../examples/Console/TestConsoleExporter.cs)
for an example of how to use the exporter.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
# Console Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Console.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Console.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console)
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
data are created and exported. It is not recommended for any production
environment.
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Console
```
## Configuration
You can configure the `ConsoleExporter` by following the directions below:
* `DisplayAsJson`: Boolean to show data as JSON.
See the
[`TestConsoleExporter.cs`](../../examples/Console/TestConsoleExporter.cs)
for an example of how to use the exporter.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)

View File

@ -1,45 +1,45 @@
# Jaeger Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Jaeger.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Jaeger.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
The Jaeger exporter communicates to a Jaeger Agent through the compact thrift
protocol on the Compact Thrift API port.
## Supported .NET Versions
This package supports all the officially supported versions of [.NET
Core](https://dotnet.microsoft.com/download/dotnet-core).
For .NET Framework, versions 4.6 and above are supported.
## Prerequisite
* [Get Jaeger](https://www.jaegertracing.io/docs/1.13/getting-started/)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Jaeger
```
## Configuration
You can configure the `JaegerExporter` by following the directions below:
* `ServiceName`: The name of your application or service.
* `AgentHost`: Usually `localhost` since an agent should usually be running on
the same machine as your application or service.
* `AgentPort`: The compact thrift protocol port of the Jaeger Agent (default
`6831`).
* `MaxPacketSize`: The maximum size of each UDP packet that gets sent to the
agent. (default `65000`).
See the
[`TestJaegerExporter.cs`](../../examples/Console/TestJaegerExporter.cs)
for an example of how to use the exporter.
## References
* [Jaeger](https://www.jaegertracing.io)
* [OpenTelemetry Project](https://opentelemetry.io/)
# Jaeger Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Jaeger.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Jaeger.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger)
The Jaeger exporter communicates to a Jaeger Agent through the compact thrift
protocol on the Compact Thrift API port.
## Supported .NET Versions
This package supports all the officially supported versions of [.NET
Core](https://dotnet.microsoft.com/download/dotnet-core).
For .NET Framework, versions 4.6 and above are supported.
## Prerequisite
* [Get Jaeger](https://www.jaegertracing.io/docs/1.13/getting-started/)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Jaeger
```
## Configuration
You can configure the `JaegerExporter` by following the directions below:
* `ServiceName`: The name of your application or service.
* `AgentHost`: Usually `localhost` since an agent should usually be running on
the same machine as your application or service.
* `AgentPort`: The compact thrift protocol port of the Jaeger Agent (default
`6831`).
* `MaxPacketSize`: The maximum size of each UDP packet that gets sent to the
agent. (default `65000`).
See the
[`TestJaegerExporter.cs`](../../examples/Console/TestJaegerExporter.cs)
for an example of how to use the exporter.
## References
* [Jaeger](https://www.jaegertracing.io)
* [OpenTelemetry Project](https://opentelemetry.io/)

View File

@ -1,7 +1,7 @@
# OpenTelemetry Protocol Implementation
`.proto` files under `Implementation\` are copied from the
[`opentelemetry-proto`](https://github.com/open-telemetry/opentelemetry-proto/commit/1a931b4b57c34e7fd8f7dddcaa9b7587840e9c08)
repo.
Trace proto files marked as stable.
# OpenTelemetry Protocol Implementation
`.proto` files under `Implementation\` are copied from the
[`opentelemetry-proto`](https://github.com/open-telemetry/opentelemetry-proto/commit/1a931b4b57c34e7fd8f7dddcaa9b7587840e9c08)
repo.
Trace proto files marked as stable.

View File

@ -1,37 +1,37 @@
# OTLP Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.OpenTelemetryProtocol.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.OpenTelemetryProtocol.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
The OTLP (OpenTelemetry Protocol) exporter communicates to an OpenTelemetry
Collector through a gRPC protocol.
## Prerequisite
* [Get OpenTelemetry Collector](https://opentelemetry.io/docs/collector/about/)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol
```
## Configuration
You can configure the `OtlpExporter` by following the directions below:
* `Endpoint`: Target to which the exporter is going to send traces or metrics.
* `Credentials`: Client-side channel credentials.
* `Headers`: Optional headers for the connection.
See the
[`TestOtlpExporter.cs`](../../examples/Console/TestOtlpExporter.cs)
for an example of how to use the exporter.
## References
* [OpenTelemetry
Collector](https://github.com/open-telemetry/opentelemetry-collector)
* [OpenTelemetry Project](https://opentelemetry.io/)
* [OpenTelemetry
Protocol](https://github.com/open-telemetry/opentelemetry-proto)
# OTLP Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.OpenTelemetryProtocol.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.OpenTelemetryProtocol.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol)
The OTLP (OpenTelemetry Protocol) exporter communicates to an OpenTelemetry
Collector through a gRPC protocol.
## Prerequisite
* [Get OpenTelemetry Collector](https://opentelemetry.io/docs/collector/about/)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol
```
## Configuration
You can configure the `OtlpExporter` by following the directions below:
* `Endpoint`: Target to which the exporter is going to send traces or metrics.
* `Credentials`: Client-side channel credentials.
* `Headers`: Optional headers for the connection.
See the
[`TestOtlpExporter.cs`](../../examples/Console/TestOtlpExporter.cs)
for an example of how to use the exporter.
## References
* [OpenTelemetry
Collector](https://github.com/open-telemetry/opentelemetry-collector)
* [OpenTelemetry Project](https://opentelemetry.io/)
* [OpenTelemetry
Protocol](https://github.com/open-telemetry/opentelemetry-proto)

View File

@ -1,29 +1,29 @@
# Prometheus Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Prometheus.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Prometheus.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
## Prerequisite
* [Get Prometheus](https://prometheus.io/docs/introduction/first_steps/)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Prometheus
```
## Configuration
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/`.
See
[`TestPrometheusExporter.cs`](../../examples/Console/TestPrometheusExporter.cs)
for example use.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [Prometheus](https://prometheus.io)
# Prometheus Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Prometheus.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Prometheus.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus)
## Prerequisite
* [Get Prometheus](https://prometheus.io/docs/introduction/first_steps/)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Prometheus
```
## Configuration
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/`.
See
[`TestPrometheusExporter.cs`](../../examples/Console/TestPrometheusExporter.cs)
for example use.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [Prometheus](https://prometheus.io)

View File

@ -1,26 +1,26 @@
# ZPages Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.ZPages.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.ZPages.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.ZPages
```
## Configuration
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/`.
* `RetentionTime`: The retention time (in milliseconds) for the metrics.
See the
[`TestZPagesExporter.cs`](../../examples/Console/TestZPagesExporter.cs)
for an example of how to use the exporter.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [zPages](https://opencensus.io/zpages/)
# ZPages Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.ZPages.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.ZPages.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.ZPages)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.ZPages
```
## Configuration
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/`.
* `RetentionTime`: The retention time (in milliseconds) for the metrics.
See the
[`TestZPagesExporter.cs`](../../examples/Console/TestZPagesExporter.cs)
for an example of how to use the exporter.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [zPages](https://opencensus.io/zpages/)

View File

@ -1,32 +1,32 @@
# Zipkin Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Zipkin.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Zipkin.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
## Prerequisite
* [Get Zipkin](https://zipkin.io/pages/quickstart.html)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Zipkin
```
## Configuration
You can configure the `ZipkinExporter` by following the directions below:
* `Endpoint`: Zipkin endpoint address.
* `TimeoutSeconds`: Timeout in seconds.
* `ServiceName`: Name of the service reporting telemetry.
* `UseShortTraceIds`: Value indicating whether short trace id should be used.
See
[`TestZipkinExporter.cs`](../../examples/Console/TestZipkinExporter.cs)
for example use.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [Zipkin](https://zipkin.io)
# Zipkin Exporter for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.Zipkin.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.Zipkin.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin)
## Prerequisite
* [Get Zipkin](https://zipkin.io/pages/quickstart.html)
## Installation
```shell
dotnet add package OpenTelemetry.Exporter.Zipkin
```
## Configuration
You can configure the `ZipkinExporter` by following the directions below:
* `Endpoint`: Zipkin endpoint address.
* `TimeoutSeconds`: Timeout in seconds.
* `ServiceName`: Name of the service reporting telemetry.
* `UseShortTraceIds`: Value indicating whether short trace id should be used.
See
[`TestZipkinExporter.cs`](../../examples/Console/TestZipkinExporter.cs)
for example use.
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [Zipkin](https://zipkin.io)

View File

@ -1,14 +1,14 @@
# OpenTelemetry.Extensions.Hosting
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Extensions.Hosting.svg)](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Extensions.Hosting.svg)](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
## Installation
```shell
dotnet add package OpenTelemetry.Extensions.Hosting
```
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
# OpenTelemetry.Extensions.Hosting
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Extensions.Hosting.svg)](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Extensions.Hosting.svg)](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting)
## Installation
```shell
dotnet add package OpenTelemetry.Extensions.Hosting
```
## References
* [OpenTelemetry Project](https://opentelemetry.io/)

View File

@ -1,155 +1,155 @@
# ASP.NET Core Instrumentation for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Instrumentation.AspNetCore.svg)](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Instrumentation.AspNetCore.svg)](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
This is an [Instrumentation
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
collect telemetry about incoming web requests.
This instrumentation also collects incoming gRPC requests using
[Grpc.AspNetCore](https://www.nuget.org/packages/Grpc.AspNetCore).
## Steps to enable OpenTelemetry.Instrumentation.AspNetCore
### Step 1: Install Package
Add a reference to the
[`OpenTelemetry.Instrumentation.AspNetCore`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
package. Also, add any other instrumentations & exporters you will need.
```shell
dotnet add package OpenTelemetry.Instrumentation.AspNetCore
```
### Step 2: Enable ASP.NET Core Instrumentation at application startup
ASP.NET Core instrumentation must be enabled at application startup. This is
typically done in the `ConfigureServices` of your `Startup` class. The example
below enables this instrumentation by using an extension method on
`IServiceCollection`. This extension method requires adding the package
[`OpenTelemetry.Extensions.Hosting`](../OpenTelemetry.Extensions.Hosting/README.md)
to the application. This ensures the instrumentation is disposed when the host
is shutdown.
Additionally, this examples sets up the OpenTelemetry Jaeger exporter, which
requires adding the package
[`OpenTelemetry.Exporter.Jaeger`](../OpenTelemetry.Exporter.Jaeger/README.md) to
the application.
```csharp
using Microsoft.Extensions.DependencyInjection;
using OpenTelemetry.Trace;
public void ConfigureServices(IServiceCollection services)
{
services.AddOpenTelemetryTracing(
(builder) => builder
.AddAspNetCoreInstrumentation()
.AddJaegerExporter()
);
}
```
## Advanced configuration
This instrumentation can be configured to change the default behavior by using
`AspNetCoreInstrumentationOptions`, which allows configuring
[`Propagator`](#propagator) and [`Filter`](#filter) as explained below.
### Propagator
TODO
### Filter
This instrumentation by default collects all the incoming http requests. It
allows filtering of requests by using `Filter` function in
`AspNetCoreInstrumentationOptions`. This can be used to filter out any requests
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
exception.
The following shows an example of `Filter` being used to filter out all POST
requests.
```csharp
services.AddOpenTelemetryTracing(
(builder) => builder
.AddAspNetCoreInstrumentation(
opt => opt.Filter =
(httpContext) =>
{
// filter out all HTTP POST requests.
return !httpContext.Request.Method.Equals("POST");
})
.AddJaegerExporter()
);
```
It is important to note that this `Filter` option is specific to this
instrumentation. OpenTelemetry has a concept of
[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.
### Special topic - Enriching automatically collected telemetry
This instrumentation library stores the raw `HttpRequest`, `HttpResponse`
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.
The key name for HttpRequest custom property inside Activity is
"OTel.AspNetCore.Request".
The key name for HttpResponse custom property inside
Activity is "OTel.AspNetCore.Response".
```csharp
internal class MyAspNetCoreEnrichingProcessor : ActivityProcessor
{
public override void OnStart(Activity activity)
{
// Retrieve the HttpRequest object.
var httpRequest = activity.GetCustomProperty("OTel.AspNetCore.Request")
as HttpRequest;
if (httpRequest != null)
{
// Add more tags to the activity
activity.SetTag("mycustomtag", httpRequest.Headers["myheader"]);
}
}
public override void OnEnd(Activity activity)
{
// Retrieve the HttpResponse object.
var httpResponse = activity.GetCustomProperty("OTel.AspNetCore.Response")
as HttpResponse;
if (httpResponse != null)
{
var statusCode = httpResponse.StatusCode;
bool success = statusCode < 400;
// Add more tags to the activity or replace an existing tag.
activity.SetTag("myCustomSuccess", success);
}
}
}
```
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
changes done by them.
```csharp
services.AddOpenTelemetryTracing(
(builder) => builder
.AddAspNetCoreInstrumentation()
.AddProcessor(new MyAspNetCoreEnrichingProcessor())
);
```
## References
* [Introduction to ASP.NET
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)
* [OpenTelemetry Project](https://opentelemetry.io/)
# ASP.NET Core Instrumentation for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Instrumentation.AspNetCore.svg)](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Instrumentation.AspNetCore.svg)](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
This is an [Instrumentation
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
collect telemetry about incoming web requests.
This instrumentation also collects incoming gRPC requests using
[Grpc.AspNetCore](https://www.nuget.org/packages/Grpc.AspNetCore).
## Steps to enable OpenTelemetry.Instrumentation.AspNetCore
### Step 1: Install Package
Add a reference to the
[`OpenTelemetry.Instrumentation.AspNetCore`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore)
package. Also, add any other instrumentations & exporters you will need.
```shell
dotnet add package OpenTelemetry.Instrumentation.AspNetCore
```
### Step 2: Enable ASP.NET Core Instrumentation at application startup
ASP.NET Core instrumentation must be enabled at application startup. This is
typically done in the `ConfigureServices` of your `Startup` class. The example
below enables this instrumentation by using an extension method on
`IServiceCollection`. This extension method requires adding the package
[`OpenTelemetry.Extensions.Hosting`](../OpenTelemetry.Extensions.Hosting/README.md)
to the application. This ensures the instrumentation is disposed when the host
is shutdown.
Additionally, this examples sets up the OpenTelemetry Jaeger exporter, which
requires adding the package
[`OpenTelemetry.Exporter.Jaeger`](../OpenTelemetry.Exporter.Jaeger/README.md) to
the application.
```csharp
using Microsoft.Extensions.DependencyInjection;
using OpenTelemetry.Trace;
public void ConfigureServices(IServiceCollection services)
{
services.AddOpenTelemetryTracing(
(builder) => builder
.AddAspNetCoreInstrumentation()
.AddJaegerExporter()
);
}
```
## Advanced configuration
This instrumentation can be configured to change the default behavior by using
`AspNetCoreInstrumentationOptions`, which allows configuring
[`Propagator`](#propagator) and [`Filter`](#filter) as explained below.
### Propagator
TODO
### Filter
This instrumentation by default collects all the incoming http requests. It
allows filtering of requests by using `Filter` function in
`AspNetCoreInstrumentationOptions`. This can be used to filter out any requests
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
exception.
The following shows an example of `Filter` being used to filter out all POST
requests.
```csharp
services.AddOpenTelemetryTracing(
(builder) => builder
.AddAspNetCoreInstrumentation(
opt => opt.Filter =
(httpContext) =>
{
// filter out all HTTP POST requests.
return !httpContext.Request.Method.Equals("POST");
})
.AddJaegerExporter()
);
```
It is important to note that this `Filter` option is specific to this
instrumentation. OpenTelemetry has a concept of
[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.
### Special topic - Enriching automatically collected telemetry
This instrumentation library stores the raw `HttpRequest`, `HttpResponse`
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.
The key name for HttpRequest custom property inside Activity is
"OTel.AspNetCore.Request".
The key name for HttpResponse custom property inside
Activity is "OTel.AspNetCore.Response".
```csharp
internal class MyAspNetCoreEnrichingProcessor : ActivityProcessor
{
public override void OnStart(Activity activity)
{
// Retrieve the HttpRequest object.
var httpRequest = activity.GetCustomProperty("OTel.AspNetCore.Request")
as HttpRequest;
if (httpRequest != null)
{
// Add more tags to the activity
activity.SetTag("mycustomtag", httpRequest.Headers["myheader"]);
}
}
public override void OnEnd(Activity activity)
{
// Retrieve the HttpResponse object.
var httpResponse = activity.GetCustomProperty("OTel.AspNetCore.Response")
as HttpResponse;
if (httpResponse != null)
{
var statusCode = httpResponse.StatusCode;
bool success = statusCode < 400;
// Add more tags to the activity or replace an existing tag.
activity.SetTag("myCustomSuccess", success);
}
}
}
```
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
changes done by them.
```csharp
services.AddOpenTelemetryTracing(
(builder) => builder
.AddAspNetCoreInstrumentation()
.AddProcessor(new MyAspNetCoreEnrichingProcessor())
);
```
## References
* [Introduction to ASP.NET
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)
* [OpenTelemetry Project](https://opentelemetry.io/)

View File

@ -1,15 +1,15 @@
# OpenTracing Shim for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Shims.OpenTracing.svg)](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Shims.OpenTracing.svg)](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
## Installation
```shell
dotnet add package OpenTelemetry.Shims.OpenTracing
```
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [OpenTracing](https://opentracing.io)
# OpenTracing Shim for OpenTelemetry .NET
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Shims.OpenTracing.svg)](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Shims.OpenTracing.svg)](https://www.nuget.org/packages/OpenTelemetry.Shims.OpenTracing)
## Installation
```shell
dotnet add package OpenTelemetry.Shims.OpenTracing
```
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [OpenTracing](https://opentracing.io)

View File

@ -1,89 +1,89 @@
# OpenTelemetry .NET SDK
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.svg)](https://www.nuget.org/packages/OpenTelemetry)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.svg)](https://www.nuget.org/packages/OpenTelemetry)
* [Installation](#installation)
* [Introduction](#introduction)
* [Getting started](#getting-started)
* [Configuration](#configuration)
* [Instrumentation](#instrumentation)
* [Processor](#processor)
* [Resource](#resource)
* [Sampler](#sampler)
* [Advanced topics](#advanced-topics)
* [References](#references)
## Installation
```shell
dotnet add package OpenTelemetry
```
## Introduction
OpenTelemetry SDK is a reference implementation of the OpenTelemetry API. It
implements the Tracing API, the Metrics API, and the Context API. OpenTelemetry
SDK deals with concerns such as sampling, processing pipeline, exporting
telemetry to a particular backend etc. The default implementation consists of
the following.
* Set of [Built-in
samplers](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-samplers)
* Set of [Built-in
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
batching.
* BatchingProcessor which batches and sends Activities to the exporter.
* Extensibility options for users to customize SDK.
## Getting started
Please follow the tutorial and [get started in 5
minutes](../../docs/trace/getting-started/README.md).
## Configuration
### Instrumentation
### Processor
### Resource
### 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
reducing the number of samples of traces collected and sent to the backend. If
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).
The following example shows how to change it to
[TraceIdRatioBasedSampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#traceidratiobased)
with sampling probability of 25%.
```csharp
using OpenTelemetry;
using OpenTelemetry.Trace;
using var otel = Sdk.CreateTracerProvider(b => b
.AddActivitySource("MyCompany.MyProduct.MyLibrary")
.SetSampler(new TraceIdRatioBasedSampler(0.25))
.UseConsoleExporter());
```
## Advanced topics
* Logs
* [Correlating logs with traces](../../docs/logs/correlation/README.md)
* Metrics
* [Building your own Exporter](../../docs/metrics/building-your-own-exporter.md)
* Trace
* [Building your own Exporter](../../docs/trace/extending-the-sdk/README.md#exporter)
* [Building your own Instrumentation
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 Sampler](../../docs/trace/extending-the-sdk/README.md#sampler)
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
# OpenTelemetry .NET SDK
[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.svg)](https://www.nuget.org/packages/OpenTelemetry)
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.svg)](https://www.nuget.org/packages/OpenTelemetry)
* [Installation](#installation)
* [Introduction](#introduction)
* [Getting started](#getting-started)
* [Configuration](#configuration)
* [Instrumentation](#instrumentation)
* [Processor](#processor)
* [Resource](#resource)
* [Sampler](#sampler)
* [Advanced topics](#advanced-topics)
* [References](#references)
## Installation
```shell
dotnet add package OpenTelemetry
```
## Introduction
OpenTelemetry SDK is a reference implementation of the OpenTelemetry API. It
implements the Tracing API, the Metrics API, and the Context API. OpenTelemetry
SDK deals with concerns such as sampling, processing pipeline, exporting
telemetry to a particular backend etc. The default implementation consists of
the following.
* Set of [Built-in
samplers](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-samplers)
* Set of [Built-in
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
batching.
* BatchingProcessor which batches and sends Activities to the exporter.
* Extensibility options for users to customize SDK.
## Getting started
Please follow the tutorial and [get started in 5
minutes](../../docs/trace/getting-started/README.md).
## Configuration
### Instrumentation
### Processor
### Resource
### 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
reducing the number of samples of traces collected and sent to the backend. If
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).
The following example shows how to change it to
[TraceIdRatioBasedSampler](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#traceidratiobased)
with sampling probability of 25%.
```csharp
using OpenTelemetry;
using OpenTelemetry.Trace;
using var otel = Sdk.CreateTracerProvider(b => b
.AddActivitySource("MyCompany.MyProduct.MyLibrary")
.SetSampler(new TraceIdRatioBasedSampler(0.25))
.UseConsoleExporter());
```
## Advanced topics
* Logs
* [Correlating logs with traces](../../docs/logs/correlation/README.md)
* Metrics
* [Building your own Exporter](../../docs/metrics/building-your-own-exporter.md)
* Trace
* [Building your own Exporter](../../docs/trace/extending-the-sdk/README.md#exporter)
* [Building your own Instrumentation
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 Sampler](../../docs/trace/extending-the-sdk/README.md#sampler)
## References
* [OpenTelemetry Project](https://opentelemetry.io/)