Skip to content

Commit

Permalink
Added more documentation on the option configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire committed Feb 24, 2023
1 parent 12ef20c commit 5da158c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ and environment variables.
The `OtlpExporterOptions` type setters take precedence over the environment variables.

This can be achieved by providing an `Action<OtlpExporterOptions>` delegate to the
`AddOtlpExporter()` method.
`AddOtlpExporter()` method or using `AddOptions<OtlpExporterOptions>()`.

If additional services from the dependency injection are required, they can be configured like this:
```csharp
services.AddOptions<OtlpExporterOptions>().Configure<Service>((opts, svc) => {
// ...
});
```

TODO: Show metrics specific configuration (i.e MetricReaderOptions).

Expand Down

0 comments on commit 5da158c

Please sign in to comment.