hiveco / conntrack_exporter

Prometheus exporter for tracking network connections
Apache License 2.0
134 stars 15 forks source link

Impact of exposing raw connection states? #5

Closed robn closed 1 year ago

robn commented 4 years ago

The docs say:

The TCP states are generalized as above because they tend to be a useful abstraction for typical users, and because they help minimize overhead.

I would prefer the raw connection states; for the kinds of problems we tend to have around this, the collapsed state is not useful.

What "minimized" overheads are we talking about? Just fewer metrics?

If there's no particular issue, then I'll look at adding a switch to produce the raw states instead.

dbendelman commented 4 years ago

@robn "overhead" here means cardinality.

I wouldn't be against adding such a flag in theory, but:

  1. I'd like to hear about the kinds of problems you're solving with this. (If this functionality is unlikely to be useful to others, best to just keep it in your own fork.)
  2. It would have to be coded in a way that doesn't affect performance of the current behaviour (i.e. with only 4 connection states).
  3. It can't be the default, since I think having 4 states is a better UX for the typical user in terms of both Prometheus performance and meaningfulness of the metrics.

It's been a while since I hacked on this but I believe 2 would require adding an alternate event loop.