-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
[💡 FEATURE REQUEST]: Use Opentelemerty specific environment variables #1848
Comments
Hey @fasdalf 👋 |
Hey @fasdalf 👋 otel:
# other options
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://collector:4318} In this case, if the |
Thank you, @rustatian! I gave it a try and it worked! |
Cool 🥳 |
Hey, I've finalized the configuration and noticed one thing that sounds more like an issue. if I am passing this variable to Roadrunner (e.g. via docker-compose) It is working with PHP OTEL like a charm.
notice that double "http://". If I do not add This leads to the situation that the hostname has to be configured without and on the PHP side I had to do some dirty trick
Besides that, works like a charm with collector/zipkin and/or datadog 🥳 |
Plugin
GRPC
I have an idea!
Hello! Opentelemerty plugin reads config from .rr.yaml as other plugins do.
Also specification defines environment variables https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/ and https://opentelemetry.io/docs/specs/otel/protocol/exporter/ to read default opentelemetry values from.
Roadrunner 2023 already uses library https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc#pkg-overview with support of this variables but over writes them with hardcoded defaults:
c.Resource.ServiceNamespaceKey = fmt.Sprintf("RoadRunner-%s", uuid.NewString())
sdktrace.WithResource(newResource(p.cfg.Resource, cfg.RRVersion())),
Could you restore use of this environment variables as defaults if no values are set in .rr.yaml and use hardcoded strings only when both configurations are empty?
Variables tested to be effective with otel v.1.21.1
Here is an example of code using these variables with
InitFromEnvironment()
The text was updated successfully, but these errors were encountered: