Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Prometheus metrics #1215

Merged
merged 4 commits into from
Jun 13, 2022
Merged

feat: add support for Prometheus metrics #1215

merged 4 commits into from
Jun 13, 2022

Conversation

enocom
Copy link
Member

@enocom enocom commented Jun 4, 2022

This commit adds two flags (prometheus-namespace and prometheus-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with prometheus-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.

This commit adds two flags (prometheus-namespace and prometheus-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with prometheus-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.
@enocom enocom requested a review from a team June 4, 2022 03:44
@enocom
Copy link
Member Author

enocom commented Jun 4, 2022

Here's an example of what the metrics look like when scraped by Prometheus:

image

cmd/root_test.go Outdated Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
cmd/root.go Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
@enocom enocom changed the title feat: add flags to enable prometheus metrics feat: add support for Prometheus metrics Jun 7, 2022
- Remove short flags for Prometheus
- Best effort Prometheus server shutdown
- Don't report http.ErrServerClosed
- Use context consistently in runSignalWrapper function
@enocom enocom requested a review from kurtisvg June 7, 2022 16:53
cmd/root.go Outdated Show resolved Hide resolved
@enocom enocom merged commit eeb2029 into v2 Jun 13, 2022
@enocom enocom deleted the prometheus-exporter branch June 13, 2022 15:55
@enocom enocom mentioned this pull request Jun 13, 2022
3 tasks
enocom added a commit that referenced this pull request Jun 17, 2022
This commit adds two flags (prometheus-namespace and http-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with http-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.
enocom added a commit to GoogleCloudPlatform/alloydb-auth-proxy that referenced this pull request Jul 7, 2022
enocom added a commit to GoogleCloudPlatform/alloydb-auth-proxy that referenced this pull request Jul 8, 2022
enocom added a commit that referenced this pull request Jul 12, 2022
This commit adds two flags (prometheus-namespace and http-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with http-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.
enocom added a commit that referenced this pull request Jul 27, 2022
This commit adds two flags (prometheus-namespace and http-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with http-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.
enocom added a commit that referenced this pull request Aug 23, 2022
This commit adds two flags (prometheus-namespace and http-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with http-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.
enocom added a commit that referenced this pull request Aug 29, 2022
This commit adds two flags (prometheus-namespace and http-port)
which enable a Prometheus exporter exposed at localhost:9090/metrics.
The port is configurable with http-port. When enabled, the metrics
endpoint will serve all metrics collected in the Go connector in the
Prometheus format.
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.

2 participants