-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api proposal] Cross-cutting UseOtlpExporter method #4940
Comments
There's a default endpoint you can set that gets applied to all of them right? |
Yes you can set via {
"opentelemetry_otlpexporter": {
"DefaultOptions": {
"Protocol": "HttpProtobuf",
"Endpoint": "http://otlp_endpoint/" // Note: We will append the signal path automatically to the default one
}
}
} |
As an experimental extension this feels fine to build and then propose to the TC/spec group to see if we can get a "make it as easy as possible to configure all signals to go to the same spot" thing hashed out for all languages. That said this really feels like code golfing to me. Collapsing 5 lines to 1 feels like it's a lot less of a problem being solved than critical spec deficiencies like this one: #2968 |
I think what we should be doing here is probably using the I could see something more that does a dynamic lookup to see if the I think the idea of "AddOpenTelemetry()` implicitly using config is a good one, then allowing people to configure either in code, explicitly by signal. |
[This was requested by @davidfowl & @samsp-msft]
Goal
There is a lot of code required to configure traces, metrics, & logs to use OTLP at the same endpoint:
The goal is to turn this into a ~one-liner.
Proposal
OpenTelemetry (SDK)
OpenTelemetry.Extensions.Hosting
OpenTelemetry.Exporter.OpenTelemetryProtocol
Example implementation
https://github.com/open-telemetry/opentelemetry-dotnet/compare/main...CodeBlanch:poc/otlp-builder?expand=1
Scenarios enabled
The primary goal is accomplished:
That will turn on OTLP respecting the various environment variables.
And also really nice configuration integration is enabled:
appSettings.json:
bootstrap:
The text was updated successfully, but these errors were encountered: