Skip to content

[gateway] Add Prometheus identity labels - #4219

Open
platinumhamburg wants to merge 2 commits into
apache:mainfrom
platinumhamburg:gateway-prometheus-identity-labels
Open

[gateway] Add Prometheus identity labels#4219
platinumhamburg wants to merge 2 commits into
apache:mainfrom
platinumhamburg:gateway-prometheus-identity-labels

Conversation

@platinumhamburg

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4217

Brief change log

Tests

API and Format

Documentation

@beryllw beryllw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My main question is about the Gateway identity model. We now have:

  • gateway.id: logical Gateway deployment
  • gateway.instance-id: individual Gateway instance used for diagnostics
  • gateway.host: host or network location

Is gateway.host expected to uniquely identify each Gateway replica? If it only represents location, multiple replicas may share the same value. In that case, could we expose the existing gateway.instance-id as the per-replica metric label instead?

@beryllw beryllw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we add an integration test that starts the Gateway with gateway.id and gateway.host, then verifies the labels from the actual /metrics endpoint? It would cover the configuration, lifecycle, and exporter wiring together.

Comment thread fluss-gateway/src/config.rs Outdated
@platinumhamburg

Copy link
Copy Markdown
Contributor Author

My main question is about the Gateway identity model. We now have:

  • gateway.id: logical Gateway deployment
  • gateway.instance-id: individual Gateway instance used for diagnostics
  • gateway.host: host or network location

Is gateway.host expected to uniquely identify each Gateway replica? If it only represents location, multiple replicas may share the same value. In that case, could we expose the existing gateway.instance-id as the per-replica metric label instead?

Good point. I removed gateway.host and reused the existing gateway.instance-id as the per-replica identity. It is now exposed as the instance_id metric label, while gateway.id remains the identity shared by one logical Gateway deployment. This avoids introducing two overlapping per-replica identity configurations.

@platinumhamburg

Copy link
Copy Markdown
Contributor Author

Could we add an integration test that starts the Gateway with gateway.id and gateway.host, then verifies the labels from the actual /metrics endpoint? It would cover the configuration, lifecycle, and exporter wiring together.

Added an end-to-end HTTP test that starts the Gateway with gateway.id and gateway.instance-id, fetches the actual /metrics endpoint, and verifies the gateway_id and instance_id labels. The existing configuration tests continue to cover YAML and environment-variable loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Gateway] Expose stable Gateway identity labels in Prometheus metrics

2 participants