Skip to content

Cannot sample on LogRecords #75

@Doohl

Description

@Doohl

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:

  1. Unblock ourselves by implementing a custom LogRecordProcessor that accepts a Predicate<LogRecordData> and a delegate LogRecordProcessor along with some LogRecordSampling strategy.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions