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

maint: add instrumentation for GoRedisPubSub #1229

Merged
merged 6 commits into from
Jul 18, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Jul 17, 2024

Which problem is this PR solving?

Add instrumentation for GoRedisPubSub to gain more insight on how the redis pubsub system works

Short description of the changes

  • add tracer to GoRedisPubSub
  • fix tests
  • define a type for the pubsub subscription callback function

@VinozzZ VinozzZ requested a review from a team as a code owner July 17, 2024 20:46
@@ -25,6 +28,7 @@ type GoRedisPubSub struct {
Config config.Config `inject:""`
Logger logger.Logger `inject:""`
Metrics metrics.Metrics `inject:"metrics"`
Tracer trace.Tracer `inject:"tracer"`
Copy link
Contributor

Choose a reason for hiding this comment

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

If we don't expect to inject multiple different tracers, we don't need to name them. You could remove the name here, and in main where it's created.

pubsub/pubsub_goredis.go Outdated Show resolved Hide resolved
pubsub/pubsub_goredis.go Outdated Show resolved Hide resolved
@VinozzZ VinozzZ merged commit 28665ef into main Jul 18, 2024
5 checks passed
@VinozzZ VinozzZ deleted the yingrong.instrumentation_pubsub branch July 18, 2024 15:08
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