Skip to content

Conversation

@mapno
Copy link
Contributor

@mapno mapno commented Sep 3, 2025

What this PR does:

Adds a new metric that measures bytes received before limits

Which issue(s) this PR fixes:
Fixes https://github.com/grafana/tempo-squad/issues/848

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
Name: "distributor_bytes_received_total",
Help: "The total number of proto bytes received per tenant",
}, []string{"tenant"})
metricIngressBytes = promauto.NewCounterVec(prometheus.CounterOpts{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being a bit picky, it seems we have a convention where the unit of measurement goes first:

metricBytesIngested

Although this seems incorrect, following Prometheus naming conventions. https://prometheus.io/docs/practices/naming/#metric-names

Instead of Ingress and received which may be confusing maybe we could use something like:

metricBytesRecievedRaw
distributor_bytes_received_raw_total

Copy link
Member

@electron0zero electron0zero Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

along with distributor_bytes_received_raw_total I want to throw in few more names into the mix:

  • tempo_distributor_bytes_attempted_total since these are the bytes that are attempted (may or may not be ingested)
  • distributor_bytes_received_unfiltered_total since we are capturing the bytes before ingestion limits are applied (i.e. filtering the data)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being even nitpickier, ingress bytes can be considered the measurement unit in this metric. If we wanted a verb after the unit like in distributor_bytes_received_total it could be distributor_ingress_bytes_received_total or distributor_bytes_ingressed_total.

Ideally, we would rename distributor_bytes_received_total to ingested and use distributor_bytes_received_total for this new metric.

I don't have a strong opinion on this, I'm ok to go with whichever name sounds more clear for the team.

Copy link
Member

@electron0zero electron0zero Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, I don't want to bikeshade on the name and okay with tempo_distributor_ingress_bytes_total as well.

@mapno mapno force-pushed the measure-ingress-bytes branch from cd27945 to 7d542a5 Compare September 5, 2025 12:51
@mapno mapno enabled auto-merge (squash) September 5, 2025 12:51
@mapno mapno force-pushed the measure-ingress-bytes branch from 7d542a5 to 788840b Compare September 8, 2025 09:44
@mapno mapno merged commit 2992833 into grafana:main Sep 8, 2025
52 of 54 checks passed
@mapno mapno deleted the measure-ingress-bytes branch September 8, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants