Skip to content
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

Best way to support record only configuration #83

Open
codeboten opened this issue Apr 15, 2024 · 1 comment
Open

Best way to support record only configuration #83

codeboten opened this issue Apr 15, 2024 · 1 comment

Comments

@codeboten
Copy link
Contributor

The OTel specification allows users to set a recording only option for sampler configuration. This option is not available via environment variables today: https://github.com/open-telemetry/opentelemetry-specification/blob/700f5138f4b10c6e9d11b41153f6e164c61f581d/specification/configuration/sdk-environment-variables.md#general-sdk-configuration

Should this use-case be supported by the configuration file? If so would it be as simple as adding one more type of sampler here:

@jack-berg
Copy link
Member

I don't think we should support this directly. We should focus on allowing samplers to be configured, both built in and custom implementations. The samplers we directly reference in the schema are defined in Built-in sampler. If there were to be one which was "AlwaysRecordOnly" or something like that, we ought to support it.

Short of that, the way to use file configuration to get a sampler which returns RECORD_ONLY is to implement a custom sampler which returns the response, ensure its registered with an associated component provider, and reference it by name in the configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants