-
Notifications
You must be signed in to change notification settings - Fork 35
add otel push exporter #137
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
| init_http_with_timeout_period( | ||
| url, | ||
| Duration::from_secs(OTEL_EXPORTER_OTLP_TIMEOUT_DEFAULT), | ||
| Duration::from_secs(1), |
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 period is that the same as push interval? If so, then I think we should not use such a low value, not sure what would be a better value 🤔 Maybe something like 30 seconds.
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.
im actually thinking maybe we shouldnt set these at all. then otlp exporter would fall back to using the env variables OTEL_METRIC_EXPORT_TIMEOUT and OTEL_METRIC_EXPORT_INTERVAL and if not found fall back to the default value, currently 30 timeout and 60 interval
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 have done so now
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 forgot about this, using 30 seconds is probably the better default, but also maybe it'll create struggles with the explorer with the build_info metric being looked for only on the last second. Didn't have time to test Brett's fix, maybe that's not an issue anymore
|
The only thing that I think we need is some docs about how to use this in the README or autometrics-dev/docs |
adds new features:
otel-push-exporter(parent feature, enabled automatically if one of the features below are)otel-push-exporter-httpandotel-push-exporter-grpcotel-push-exporter-tokio,otel-push-exporter-tokio-current-threadandotel-push-exporter-async-stdin the documentation we should advise on using those features if one wants to use the otel push exporter. the exporter can be invoked easily by calling
depending on which feature flags are enabled and which protocol one wants to use. the returned
OtelMeterProviderhas a customDropimplementation which will ensure that.shutdownis called before the provider is dropped.