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

Migrated metrics to prometheus #434

Merged
merged 11 commits into from
Oct 9, 2024
Merged

Migrated metrics to prometheus #434

merged 11 commits into from
Oct 9, 2024

Conversation

nastassia-dailidava
Copy link
Contributor

No description provided.

sample.stop(meterRegistry.timer("snapshot-factory.new-snapshot.time"))
sample.stop(
meterRegistry.timer(
"snapshot-factory.seconds",
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe snapshot_factory to be consistent with other metrics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, I was looking at some our other metrics, but looks like this way would be better, I changed to dots everywhere

groupSample.stop(meterRegistry.timer("snapshot-factory.get-snapshot-for-group.time"))
groupSample.stop(
meterRegistry.timer(
"snapshot-factory.seconds",
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here - snapshot_factory for consistency

.checkpoint("snapshot-updater-groups-published")
.name("snapshot-updater-groups-published").metrics()
.name("snapshot-updater.count.total")
Copy link
Collaborator

Choose a reason for hiding this comment

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

snapshot_updater/snapshot.updater - . is mapped to _, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

. is, - isn't

.name("snapshot-updater-merged").metrics()
.name("snapshot.updater.count.total")
.tag("status", "merged")
.tag("type", "global")
Copy link
Contributor

Choose a reason for hiding this comment

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

what this type means?

meterRegistry.gauge(metricName, Tags.of("status", "instance-changed"), it.instanceChanges)
meterRegistry.gauge(metricName, Tags.of("status", "snapshot-changed"), it.snapshotChanges)
meterRegistry.gauge("cache.groups.count", it.cacheGroupsCount)
it.meterRegistry.more().counter("services.watch.errors.total", listOf(), it.errorWatchingServices)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to have consistent name. So if we have watched-services, then it should be watched-services.errors.total

}, 0, interval, TimeUnit.SECONDS)
}, FluxSink.OverflowStrategy.LATEST)
return aclFlux.doOnCancel {
meterRegistry.counter("cross-dc-synchronization.cancelled").increment()
meterRegistry.counter("cross.dc.synchronization.cancelled").increment()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why there is not total at the end of metric name?

@nastassia-dailidava
Copy link
Contributor Author

nastassia-dailidava commented Oct 7, 2024

https://pastebin.cert.qxlint/view/raw/370ffe1e the resulting metrics

@nastassia-dailidava nastassia-dailidava merged commit f43cedc into master Oct 9, 2024
7 of 8 checks passed
@nastassia-dailidava nastassia-dailidava deleted the migrate-metrics branch October 9, 2024 12:14
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.

4 participants