open-telemetry / opentelemetry-dotnet-contrib

This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
https://opentelemetry.io
Apache License 2.0
458 stars 273 forks source link

Opt-out Optional Fields #1807

Open SuyliuMS opened 4 months ago

SuyliuMS commented 4 months ago

Component

OpenTelemetry.Exporter.Geneva

Is your feature request related to a problem?

No response

What is the expected behavior?

According to the spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#severity-fields, SeverityText and SeverityNumber are both optional fields. But OpenTelemetry.Exporter.Geneva now doesn't support to not log SeverityText and SeverityNumber. Actually there are more optional fields that can't be opt-out now, maybe you can fix in one time.

Which alternative solutions or features have you considered?

Maybe we can set a switch in GenevaExporterOptions to control if we want to log SeverityText and SeverityNumber.

Additional context

No response

reyang commented 4 months ago

Maybe we can set a switch in GenevaExporterOptions to control if we want to log SeverityText and SeverityNumber.

Thanks for the suggestion @SuyliuMS! It makes sense to me.