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

DistributedTracingOpts on plugin.Manager (Go Library) #5967

Closed
mjungsbluth opened this issue Jun 5, 2023 · 3 comments
Closed

DistributedTracingOpts on plugin.Manager (Go Library) #5967

mjungsbluth opened this issue Jun 5, 2023 · 3 comments

Comments

@mjungsbluth
Copy link
Contributor

mjungsbluth commented Jun 5, 2023

What is the underlying problem you're trying to solve?

OPA currently allows plugging in distributed tracing by providing either a RoundTrip or Handler. This gives the ability to plug in anything that can work with these interfaces.

The downloading of bundles seems however hard-wired to use OpenTelemetry. Especially when embedding OPA as a Go library, older OpenTracing libraries might still be in use or simply other tracing frameworks. At the very least it makes configuring tracing inconsistent.

Describe a "Good Enough" solution

  • Make the plugin.Manager configurable to use the same tracing customisation available for Rego and Query, i.e. provide a DistributedTracingOpts function that can be passed.
  • Use the same customization on creating rest clients from the plugin manager that is applied when evaluating policies.
  • Keep the existing OpenTelemetry configuration.

Alternatively the hard dependency on OpenTelemetry could also be replaced but this might break other users of the go library.

Additional Context

This is only visible if you embed OPA as library and want to see traces not only for outgoing http.send calls but also for downloading discovery / bundles.

@anderseknert
Copy link
Member

Thanks @mjungsbluth! Seems sensible to me 👍

@ashutosh-narkar
Copy link
Member

@mjungsbluth #5973 should fix this issue?

@mjungsbluth
Copy link
Contributor Author

Fixed with #5973

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

No branches or pull requests

3 participants