-
Notifications
You must be signed in to change notification settings - Fork 97
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
feat: send bytes_received through opamp custom message #1492
feat: send bytes_received through opamp custom message #1492
Conversation
62b19f4
to
b7bdf3f
Compare
agent/otel_metrics.go
Outdated
return 0, fmt.Errorf("value %f is too large to convert to int64", value) | ||
} | ||
if value < math.MinInt64 { | ||
return 0, fmt.Errorf("value %f is too small to convert to int64", value) |
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.
"too small" is probably the wrong phrase here -- MinInt64 is a very large negative number.
I'm also wondering why you bothered to introduce this function at all. It's not actually wrong, but if you had just used int64(value) it would only error if a single report is more than about 9000 terabytes. Then addOTLPSum() wouldn't have to return errors either.
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.
If there's a overflow issue that causes a datapoint missing, I would like to be able to capture it in refinery's telemetry data. My thinking is that, that's money missing for honeycomb so I want to make sure it's visible
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.
OK, fine, it's certainly not wrong. But if someone is overflowing an int64 the money missing would be at least in the millions of dollars.. I'd like to have that problem. :)
d1739f5
to
fca3046
Compare
84f993b
to
4bbf5f0
Compare
agent/agent.go
Outdated
} | ||
} | ||
|
||
func (agent *Agent) usageReport() { |
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.
Since this is specific to sending the report and not accumulating the metrics and we update the name to reflect that?
Which problem is this PR solving?
bytes_received
metrics through opamp messagesShort description of the changes
usageTracker
in opamp agent to trackbytes_received
metrics reported from Refinery internal metricsusageTracker
does all the calculation and conversion to otlp resources metrics