-
Notifications
You must be signed in to change notification settings - Fork 43
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(metering): add metering for logs #493
Conversation
f04fac6
to
9f3c623
Compare
|
We should have this package in the gateway-collector as I don't think it is going to be used in the signoz-collector See, https://signoz-team.slack.com/archives/C050MERV57W/p1735396691630329?thread_ts=1735138328.325539&cid=C050MERV57W for more details. |
) | ||
|
||
type logs struct { | ||
Logger *zap.Logger |
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 is redundant and not being use anywhere in the code.
func NewLogs(logger *zap.Logger) metering.Logs { | ||
return &logs{ | ||
Logger: logger, | ||
Sizer: metering.NewJSONSizer(logger), |
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 is hardcoded for json
, in the gateway, through the encoder one can also configure proto
, https://github.com/SigNoz/opentelemetry-gateway/blob/main/internal/processor/signozlimiterprocessor/processor.go#L91
Features
metering
with interfacemetering.Meter
for Size and Count usage calculationpdatagen
for generating a wide variety of telemetry data for testing