-
Notifications
You must be signed in to change notification settings - Fork 7
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
add support for per-signal urls #56
Conversation
val get_url : unit -> string | ||
|
||
val set_url : string -> unit | ||
(** Url of the endpoint. Default is "http://localhost:4318", | ||
or "OTEL_EXPORTER_OTLP_ENDPOINT" if set. *) |
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.
Do we want to be able to change urls
after setup? If so, I can re-introduce set_url_{traces,metrics,logs}
.
For getters, I'm wondering if that's needed, one can always do:
let config = ref (Config.make ())
(* and then somewhere else *)
let url_traces = !config.url_traces
Or am I missing something ?
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.
I think we should be able to live without it. I'll double check but we normally use with_setup
only which should be safe.
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.
I think this is a really good change, thank you!
val get_url : unit -> string | ||
|
||
val set_url : string -> unit | ||
(** Url of the endpoint. Default is "http://localhost:4318", | ||
or "OTEL_EXPORTER_OTLP_ENDPOINT" if set. *) |
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.
I think we should be able to live without it. I'll double check but we normally use with_setup
only which should be safe.
Co-authored-by: Simon Cruanes <[email protected]>
Thanks for the review, I've applied the same changes to the |
Thank you :) |
This PR adds support for per-signal URLs configuration. See https://opentelemetry.io/docs/specs/otel/protocol/exporter/#endpoint-urls-for-otlphttp
I've only modified the
ocurl
client for now to reduce diff. Once approved, I can make the same changes for thelwt
client