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

feat: Add basic telemetry to event, batch and OTLP endpoints #1431

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

MikeGoldsmith
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith commented Nov 15, 2024

Which problem is this PR solving?

We don't currently have any logging or telemetry for our endpoints that receive data (spans & logs). This PR adds tracing to the following endpoints using OTel instrumentation libraries. It also configures husky to set appropriate validation error attributes.

Endpoints:

  • /event
  • /batch
  • OTel trace (http & OTLP)
  • OTel logs (http & OTLP)

Closes the following issue:

Short description of the changes

  • Configure husky's telemetry callback to set validation attributes on existing spans
  • Inject the already configured OTel Tracer into the Router
  • Add otelhttp & otelgrpc instrumentation libraries and wire up
  • Update tests to set a NoopTracer in the router

Example HTTP span
image

Example gRPC span
image

@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner November 15, 2024 16:13
@MikeGoldsmith MikeGoldsmith self-assigned this Nov 15, 2024
@MikeGoldsmith MikeGoldsmith added this to the v2.9 milestone Nov 15, 2024
Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

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

Seems useful. Are there any more attributes you want to add to the spans so we know more about them?

cmd/refinery/main.go Outdated Show resolved Hide resolved
@MikeGoldsmith MikeGoldsmith merged commit 6beef3d into main Nov 18, 2024
6 checks passed
@MikeGoldsmith MikeGoldsmith deleted the mike/endpoint-telemetry branch November 18, 2024 14:21
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.

Refinery returns GRPC errors, but doesn't log them
2 participants