-
Notifications
You must be signed in to change notification settings - Fork 72
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
self_metrics : Write enabled_receivers
and feature_tracking
metrics to OTLP json.
#1882
base: master
Are you sure you want to change the base?
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
f1e1485
to
63ebf59
Compare
4e6a781
to
8517aa7
Compare
8517aa7
to
a1876b4
Compare
runHealthChecks() | ||
log.Println("Startup checks finished") | ||
if *healthChecks { | ||
// If healthchecks is set, stop here | ||
return nil | ||
} | ||
case "otel": |
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
something
beforesomething else
happens 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.
filepath.Join(os.Getenv("PROGRAMDATA"), dataDirectory, "run"), | ||
filepath.Join(s.outDirectory, subagent)); err != nil { | ||
outDir := filepath.Join(s.outDirectory, subagent) | ||
if subagent == "otel" { |
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
Description
Write
enabled_receivers
andfeature_tracking
metrics to OTLP json. This PR doesn't remove the current metric collection from the diagnostics service.Related issue
b/333412970
How has this been tested?
Checklist: