feat: Create a network payload meter #495
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds some refactoring on top of #493 which makes it generic and also allows it to be used in the gateway code.
Provides a way for serialization, it could be
json
orproto
Provides a way to do decoding, it could be
otlp
(plain upstream marshaling), orsignoz
(deep marshaling used in billing)Implements
Meter
forlogs
,metrics
,traces
.On the new instances of
logs
,metrics
,traces
,Size
andCount
can directly be called without worrying about anything.But still there are few concerns, since we are deciding to put the module in
[signoz-otel-collector](https://github.com/SigNoz/signoz-otel-collector)
I am facing below problems:I am trying to import the new module (tagged with v0.111.19-68c19db8) but it is causing the
go.mod
tidy to get updated, we are using old libraries from collector, which is breaking the gateway code.This would cause the gateway code to break every time there's a library update in upstream.
Even if we use this new package only without updating the other packges, it is importing other packages as a requirement mentioned in
go.mod
the reason gateway is importing new libraries is because of this https://github.com/SigNoz/signoz-otel-collector/pull/495/files#diff-b16c4c76ae88fb01ad12b932f6fa9fa83111a12fe0a996d208618fdfc75eb9f4R5-R10