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

feature: move to telemetry events to report stats #24

Merged
merged 4 commits into from
May 23, 2024
Merged

Conversation

ssepml
Copy link

@ssepml ssepml commented May 21, 2024

Description

At the moment, the library uses stdlib2 to report metrics which doesn't work as the system moved to prometheus.

In this PR, the metrics are replaced with telemetry events that allow the main application to decide what to do with them: create metrics or logs.

@ssepml ssepml requested a review from a team May 21, 2024 06:00
src/krc_pb_client.erl Outdated Show resolved Hide resolved
@ssepml ssepml force-pushed the telemetry branch 2 times, most recently from b269213 to 83cbf4b Compare May 21, 2024 12:27
@ssepml ssepml changed the title chore: move to telemetry events to report stats feature: move to telemetry events to report stats May 22, 2024
README.md Outdated

- `[krc_pb_client, request, stop]` emitted at the end of a request to riak
- Measurement: `#{duration => integer(), monotonic_time => integer()}`
- Metadata: `#{request => map(), response => ok | error, error => term()}`

Choose a reason for hiding this comment

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

Doesn't this one always include bucket as well? It looks like it reading the metadata helper in the code below.

Copy link
Author

@ssepml ssepml May 23, 2024

Choose a reason for hiding this comment

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

It does, it's inside the request map.

To extend on this a little bit, having the whole spec in there would make it a bit hard to read. The idea was to just have a high level idea of what's in the event

@ssepml ssepml merged commit 67c638c into master May 23, 2024
@ssepml ssepml deleted the telemetry branch May 23, 2024 08:11
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.

3 participants