-
Notifications
You must be signed in to change notification settings - Fork 1
fix: clarify and expand the default env vars the agent provides to the configs #142
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
Conversation
bce5563
to
d1b65ed
Compare
os.Setenv("OBSERVE_TOKEN", "Bearer "+token) | ||
os.Setenv("OBSERVE_COLLECTOR_URL", collector_url) | ||
os.Setenv("OBSERVE_OTEL_ENDPOINT", otelEndpoint) | ||
os.Setenv("OBSERVE_PROMETHEUS_ENDPOINT", promEndpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this get used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nowhere yet, but I will use it for the prometheus remote write exporter as I'm doing the metrics conversion.
@@ -83,9 +83,9 @@ processors: | |||
|
|||
exporters: | |||
otlphttp/observe: | |||
endpoint: ${env:OBSERVE_ENDPOINT} | |||
endpoint: ${env:OBSERVE_OTEL_ENDPOINT} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works today and is just a cleanup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! This works, but it couldn't be used for prometheus or other collection as it had the /v2/otel
baked into it. I think in an ideal world, users would specify the token and collection endpoint as top level env vars or config, and never reference them explicitly anywhere else.
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…e configs (#142) ### Description Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
…he configs (#142) Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by `"Bearer "`, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with `"/v2/otel"` - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
Description
Clarify and expand the default env vars the agent provides to the configs. This makes the vanilla collector endpoint available as well as exposing the prometheus endpoint. It also renames OBSERVE_TOKEN to OBSERVE_AUTHORIZATION_HEADER for clarity since the value is prefixed by
"Bearer "
, and renames OBSERVE_ENDPOINT to OBSERVE_OTEL_ENDPOINT since the value is suffixed with"/v2/otel"
Checklist