-
Notifications
You must be signed in to change notification settings - Fork 77
self_metrics : Write enabled_receivers and feature_tracking metrics to OTLP json.
#1882
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
enabled_receivers and feature_tracking metrics to OTLP json.enabled_receivers and feature_tracking metrics to OTLP json.
16da222 to
1e224a4
Compare
5f2f7ff to
f1e1485
Compare
4e6a781 to
8517aa7
Compare
8517aa7 to
a1876b4
Compare
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.
Why does does run in this case? Or does it not matter (i.e. we only want this run once). Adding a comment here would help clarify
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.
IMO, the new generated otlp metric files (feature_tracking_otlp.json, enabled_receivers_otlp.json) are somehow part of the Otel Collector configuration, a pre-condition for the Ops Agent otel collector to work as expected and collect self metrics about it's configuration. Considering this i made the decision to place the files in the same /run folder as the otel.yaml config :
"/run/google-cloud-ops-agent-opentelemetry-collector/otel.yaml"
"/run/google-cloud-ops-agent-opentelemetry-collector/feature_tracking_otlp.json"
"/run/google-cloud-ops-agent-opentelemetry-collector/enabled_receivers_otlp.json"
Why does does run in this case? Or does it not matter (i.e. we only want this run once). Adding a comment here would help clarify ?
It matters it only being in otel service (with the previous considerations) because :
- The main service (service == "") does not write Config Files (it only does config validation and runs health checks). The "fluentbit" and "otel" services write the Config Files.
- This way only "otel" service writes otel collector related config files.
- [General Design] The systemd (and windows) services run independently. We do set preconditions for order of execution, but (as i've explored in the past) setting expectations from one service doing
somethingbeforesomething elsehappens in another always potentially could create unexpectedrace conditions.
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.
P.D. I tried putting everything in uc.GenerateFilesFromConfig to make everything simpler, but we need both the userConfig and the mergedConfig.
cmd/ops_agent_windows/run_windows.go
Outdated
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.
Same as before, why is this a otel specific check?
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.
Responded in the other comment.
81c36e5 to
276d198
Compare
|
All tests pass in commit d3e3f50. Rebasing and merging. |
d3e3f50 to
bc4351b
Compare
Description
Write
enabled_receiversandfeature_trackingmetrics to OTLP json. This PR doesn't remove the current metric collection from the diagnostics service.Related issue
b/396458573
How has this been tested?
Checklist: