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

[WIP] Add WithMetricProvider for BatchSpanProcessor #5201

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

logan-stytch
Copy link

Description

This PR introduces a WithMetricProvider option for the BatchSpanProcessor, implementing the same metrics that are currently provided by opentelemetry-java.

I roughly followed the comment in #2547, but so far only added support for the metrics currently supported in Java. I'm open to doing more, but felt a bit unsure especially of how to create a "new type that is the union of both Options" (which was suggested in the previous thread).

Testing

I haven't added any new tests yet. I suspect I probably want to add some sort of test in batch_span_processor_test.go to validate the metric behavior, but I'm not sure what exactly that should look like yet.

Where I'd like guidance

  • What sort of testing should I add?
  • Would it be desirable to add more metrics now (like those listed in Trace SDK observability #2547)?
  • Creating the gauge and counter can return an error -- I wasn't sure how to handle this, so I added a panic for now, but I'm almost certain that's not the preferred approach.

Copy link

linux-foundation-easycla bot commented Apr 12, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

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

Successfully merging this pull request may close these issues.

None yet

1 participant