You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Periodically we start a session. A session increments a counter, e.g. "bytes_received".
Each session has a set of attributes, e.g.:
{
"type": "type1"// or "type2", "type3", etc."address": "address1"// or "address2", "address3", etc.
}
The possible values of the attributes are a finite, but occasionally increasing list, and there can be many different combinations of said attributes, e.g. { "type1", "address2" }, { "type1", "address3" }, { "type3", "address2" }, ...
I want the value of the counter for a specific session to only be increased for the duration of the session. In some cases, another session with the same set of attributes may be started after some time, in that case, the value should be exported once again.
This is how we currently handle this process:
on initial startup:
create exporter
create meterProvider
set meterProvider
once session starts:
get meter
create counter
for every packet:
increment counter
This has resulted in there being >100 different counters (and growing) continuously being updated, when in reality, only 0-2 are actually being updated at any given moment.
We use the GRPC exporter writing to an opentelemetry-collector that is then writing to VictoriaMetrics with prometheusremotewrite.
How would I go about implementing such a solution?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What am I trying to achieve?
Periodically we start a session. A session increments a counter, e.g. "bytes_received".
Each session has a set of attributes, e.g.:
The possible values of the attributes are a finite, but occasionally increasing list, and there can be many different combinations of said attributes, e.g. { "type1", "address2" }, { "type1", "address3" }, { "type3", "address2" }, ...
I want the value of the counter for a specific session to only be increased for the duration of the session. In some cases, another session with the same set of attributes may be started after some time, in that case, the value should be exported once again.
This is how we currently handle this process:
This has resulted in there being >100 different counters (and growing) continuously being updated, when in reality, only 0-2 are actually being updated at any given moment.
We use the GRPC exporter writing to an opentelemetry-collector that is then writing to VictoriaMetrics with prometheusremotewrite.
How would I go about implementing such a solution?
Beta Was this translation helpful? Give feedback.
All reactions