Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Updated telemetry events #189

Merged
merged 8 commits into from
Jun 8, 2020
Merged

Updated telemetry events #189

merged 8 commits into from
Jun 8, 2020

Conversation

akoutmos
Copy link
Collaborator

@akoutmos akoutmos commented Jun 1, 2020

This PR refactors telemetry events so that they are in their own modules and used in the applicable spots. This cleans up the the consumer and publisher modules and pulls documentation into the modules themselves. This design is largely influenced by Finch (https://github.com/keathley/finch/blob/master/lib/finch/telemetry.ex).

I also updated the fields in the measurement maps to align with the comments in beam-telemetry/telemetry#57.

Description

Telemetry events have been updated to be inline with Telemetry guidelines.

Checklist

  • I have added unit tests to cover my changes.
  • I have improved the code quality of this repo. (refactoring, or reduced number of static analyser issues)
  • I have updated the documentation accordingly

@coveralls
Copy link

coveralls commented Jun 1, 2020

Coverage Status

Coverage decreased (-0.4%) to 89.967% when pulling 4248587 on updated-telemetry-events into 7d88f8b on master.

@akoutmos akoutmos marked this pull request as ready for review June 1, 2020 19:45
@akoutmos
Copy link
Collaborator Author

akoutmos commented Jun 1, 2020

This one should be good to review now. All changes that I could gather from the various Elixir community projects are in.

Copy link
Collaborator

@vorce vorce left a comment

Choose a reason for hiding this comment

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

Nice. I think we might have to mention the change from time to system_time as key for the start events somewhere (maybe release notes is enough @mkorszun ?).

@mkorszun
Copy link
Collaborator

mkorszun commented Jun 2, 2020

@vorce yes, will take care of the communication. There will be followup PR to update all docs and maybe document migration steps for 2->3

README.md Outdated
@@ -117,11 +119,6 @@ GenRMQ.Publisher.publish(Publisher, Jason.encode!(%{msg: "msg"}))
- [Consumer without deadletter configuration][without_deadletter_configuration]
- [Consumer with quorum queues][with_quorum_queue_type]

### Metrics
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not convinced with removing this documentation. We should still treat these modules as internal ones. Users should not interact with them directly meaning that they might not come across their documentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! I added it back in the README and have the links going to the modules. That work?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@akoutmos yes, sounds good 👍

@mkorszun
Copy link
Collaborator

mkorszun commented Jun 2, 2020

@akoutmos could you elaborate a little about changes in telemetry events? I went quickly through beam-telemetry/telemetry#57 but I do not find it clear.

@akoutmos
Copy link
Collaborator Author

akoutmos commented Jun 3, 2020

@akoutmos could you elaborate a little about changes in telemetry events? I went quickly through beam-telemetry/telemetry#57 but I do not find it clear.

From what I gathered from the various issues and PRs to the other repos, the primary changes were the switch from time -> system_time in the start event. The standardization of the exception event when an exception occurs and a stacktrace is possibly available. Also the fact that the stop event can have an optional error field to denote that something went wrong...but not necessarily an exception with a stacktrace.

@akoutmos
Copy link
Collaborator Author

akoutmos commented Jun 4, 2020

This one should be good to merge now I imagine ? The CI error is because 1 of the jobs failed to publish to coveralls and the link check will fail until the docs make their way to master.

@mkorszun
Copy link
Collaborator

mkorszun commented Jun 4, 2020

@akoutmos great, will merge it soon. Great job 👍

@mkorszun mkorszun merged commit bd05c29 into master Jun 8, 2020
@mkorszun mkorszun deleted the updated-telemetry-events branch June 8, 2020 06:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants