8000 chore: add better telemetry to database by abelanger5 · Pull Request #268 · hatchet-dev/hatchet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: add better telemetry to database #268

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

Merged
merged 2 commits into from
Mar 15, 2024
Merged

Conversation

abelanger5
Copy link
Contributor

Description

Adds an otelpgx integration to the database for better observability around queries.

Type of change

  • Chore (changes which are not directly related to any business logic)

What's Changed

  • Adds otelpgx
  • Fixes some small error strings and edge cases

Copy link
vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 6:48pm

@abelanger5 abelanger5 requested a review from steebchen March 15, 2024 14:26
Comment on lines +400 to +404
ctx, span1 := telemetry.NewSpan(ctx, "db-list-workflows-for-event")
defer span1.End()

tx, err := r.pool.Begin(context.Background())

if err != nil {
return nil, err
}

defer deferRollback(context.Background(), r.l, tx.Rollback)
ctx, span2 := telemetry.NewSpan(ctx, "db-list-workflows-for-event-query")
defer span2.End()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this just a duplicate now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, I added another span2.End later on as well.

@abelanger5 abelanger5 merged commit d936052 into main Mar 15, 2024
@abelanger5 abelanger5 deleted the belanger/otel-database branch March 15, 2024 19: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
0