We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi! I have a request modifier plugin that uses go-redis, and I'd like to instrument it via https://pkg.go.dev/github.com/redis/go-redis/extra/redisotel/v9.
To be able to send custom metrics and spans from a plugin, I need access to the OTEL meter and tracer providers, but AFAIK krakend-otel never calls https://pkg.go.dev/go.opentelemetry.io/otel#SetMeterProvider and https://pkg.go.dev/go.opentelemetry.io/otel#SetTracerProvider, which means the only way to get them from a plugin is to import github.com/krakend/krakend-otel/state and call state.GlobalState().
github.com/krakend/krakend-otel/state
state.GlobalState()
This works, but I think it would be better if plugins didn't have to depend on krakend-otel directly 😄
I can prepare a PR to make these calls in https://github.com/krakend/krakend-otel/blob/main/state/global.go, if you want. Thanks!
The text was updated successfully, but these errors were encountered:
Good suggestion! We would also like to use this feature. We have hijacked the metrics call to achieve this but this approach would be way better.
I've prepared a different pr for adding custom labels to already created metrics but I think it is not appropriate in your case.
But it is in the same area of customizing metrics so it would be good to do the above!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi!
I have a request modifier plugin that uses go-redis, and I'd like to instrument it via https://pkg.go.dev/github.com/redis/go-redis/extra/redisotel/v9.
To be able to send custom metrics and spans from a plugin, I need access to the OTEL meter and tracer providers, but AFAIK krakend-otel never calls https://pkg.go.dev/go.opentelemetry.io/otel#SetMeterProvider and https://pkg.go.dev/go.opentelemetry.io/otel#SetTracerProvider, which means the only way to get them from a plugin is to import
github.com/krakend/krakend-otel/state
and callstate.GlobalState()
.This works, but I think it would be better if plugins didn't have to depend on krakend-otel directly 😄
I can prepare a PR to make these calls in https://github.com/krakend/krakend-otel/blob/main/state/global.go, if you want. Thanks!
The text was updated successfully, but these errors were encountered: