-
Notifications
You must be signed in to change notification settings - Fork 17
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
How configuration would work in .NET #82
Comments
I believe that is already the case. At least that is how I planned it for Erlang/Elixir. We have similar in Erlang config. A Release contains at least 1 But if the user passes a configuration file the plan was to ignore per-Application configuration on |
Thanks for the clarification, @tsloughter Reading https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-configuration.md#other-mechanisms, I get an impression that 'other mechanisms' are unregulated by the spec. Also, the OTEP says that SDK MUST provide file option, which would probably be a rare case for .NET users. It'd be great to have more clarity eventually. |
Right, the other mechanisms are unregulated.
Oh, were you saying .NET didn't want to provide support for the file at all? |
I'm not speaking on behalf of @open-telemetry/dotnet-maintainers and @open-telemetry/dotnet-approvers and would be interested in their opinion on this. This is my personal perspective: as a .NET developer I would not benefit from separate config file and I don't think it should be required. But I'd really appreciate if .NET OTel json config structure matched common config properties defined here. |
We've had some talks in .NET but haven't made any decisions yet. We definitely want to support the config file. We also would like to support the standard .NET way of configuring things. Here are my personal thoughts... Today we support .NET's Now the config file itself has some dependency requirements. Like you can turn on OtlpExporter via the config. The .NET SDK alone can't do that without a dependency to the OtlpExporter assembly. So we might have to ship all of this as an add-on meta package (or something) which brings in all the assemblies for what is possible to configure. Or we try to dynamically load assemblies from the SDK for what is requested and blow up on startup for missing dependencies of things requested via config. Anyway I feel we have options to explore and we should be able to do something to support the config file. Likely needs some prototyping. |
I think this is a problem for every implementation. Esp when third party propagators, id generators, exporters and eventually instrumentation libraries are taken into account. But a separate issue to this discussion. But I will ask, shouldn't it already be an issue? What happens today if the user defines |
At the moment .NET doesn't support |
.NET configuration is a very common and convenient way to configure all sorts of .net apps.
It supports multiple configuration sources, but merges them in one common configuration object.
The common pattern is to define configuration for all components in a single file -
appsettings.json
and add/override things via other sources.Given that it's the idiomatic way to do things in this ecosystem:
The ideal outcome as I see it is that configuration story should leave a room for SDKs to decide how onboarding happens and whether it's done within a separate file or as a part of existing configuration system.
I assume there could be a similar ask to integrate otel configuration with spring config, microprofile config or something else.
In .NET it might look like a otel-specific section in the
appsettings.yaml
and no env var to opt into - this is pretty much how it could happen today, but I assume the schema will need to change to match new one defined in this repo.The text was updated successfully, but these errors were encountered: