-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Related to PR #74 ...
Issue
We do not have a solution for sampling on LogRecords in Android. Currently, OpenTelemetry API only has a spec for Trace sampling. As of today, there is no open spec proposal for sampling on LogRecords.
This is important because in the Client instrumentation world, we heavily use OpenTelemetry events for key performance telemetry. Additionally, there is a long term plan to deprecate the Span Event API: open-telemetry/opentelemetry-specification#4430
Ideas
We can follow these threads in parallel to resolve this issue:
- Unblock ourselves by implementing a custom
LogRecordProcessorthat accepts aPredicate<LogRecordData>and a delegateLogRecordProcessoralong with someLogRecordSamplingstrategy.- We can freely contribute this component to: https://github.com/open-telemetry/opentelemetry-java-contrib
- Make a proposal to change the OpenTelemetry spec and properly implement this in all language APIs and SDKs: https://github.com/open-telemetry/opentelemetry-specification
Option 2 is more work, and will require also implementing this change in upstream Java (and Swift). But it would help solve this problem for the entire community.
We can follow both in parallel, and simply swap out our custom processor with the proper upstream processor if and when it becomes available.