-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add option to send forwarded metrics to Observe via OTLP #212
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
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
![]() |
Infrastructure as Code | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
SAST | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
Secrets | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
Vulnerabilities | ![]() ![]() ![]() ![]() |
View in Orca |
b52a37e
to
503a0d4
Compare
authorization: ${env:OBSERVE_AUTHORIZATION_HEADER} | ||
x-observe-target-package: "Metrics" | ||
sending_queue: | ||
num_consumers: 4 |
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.
how'd you land on these values?
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.
These are the same values used in all of our otlphttp exporters. It's lower than the default, but I don't know how we arrived at them in the first place. Do you think we should make them configurable in the agent config?
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.
dont need to in this PR
# Enable forwarding of local app metrics and traces | ||
forwarding: | ||
enabled: true | ||
otlp_metrics: true |
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.
its a little unclear that these are referring to the output format; maybe we should nest this in another object something like
forwarding:
enabled: true
output:
metrics_format: "prometheus" or "OTLP"
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 went with:
forwarding:
enabled: true
metrics:
output_format: "otlp"
to match your helm change (but kept snake case like the rest of the agent config).
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.
should the format be otel
or otlp
? the latter is more specific but references the protocol vs. the actual schema/data format
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 otel make sense; I liked that in the helm chart. Updated!
configFile := v.ConfigFileUsed() | ||
if configFile == "" { | ||
return false, nil, fmt.Errorf("no config file defined") | ||
} | ||
if _, err := os.Stat(configFile); err != nil && errors.Is(err, os.ErrNotExist) { |
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 seems like an unrelated change? should it be in the same PR?
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.
The diagnose check wasn't previously applying our config defaulting logic. Since this change adds a config option with a default that's invalid when empty, diagnose needed to be updated. So it's a loosely related bugfix that needs to happen before this option is added. I can split it out if you prefer?
c637fcb
to
9b5d0b4
Compare
Description
Add option to send forwarded metrics to Observe via OTLP. Going forward, we want to be able to send all custom metrics to Observe in the format the user prefers (between OTLP or Prometheus)