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 open telemetry instrumentation #2786

Merged
merged 7 commits into from
Dec 10, 2024
Merged

feat: add open telemetry instrumentation #2786

merged 7 commits into from
Dec 10, 2024

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented Dec 9, 2024

This commit adds some useful automatic instrumentation for when users are using --unstable-otel:

  • Fresh renames the span for incoming HTTP requests to $METHOD $ROUTE and the http.route attribute is added.
  • Fresh creates a span around FS route handlers, showing whether they returned a response or data.
  • Fresh creates a span around async components, showing how long they took to execute.
  • Fresh adds a span around preact rendering, showing how long rendering takes.
  • Fresh adds a span around static file serving, showing how long it took and whether there were requests without a cache bust key.

We can improve this in the future with more telemetry, such as metrics.

@@ -1,75 +1,88 @@
{
Copy link
Member Author

Choose a reason for hiding this comment

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

My previous PR accidentally removed all test dependencies from the lock file 😓

@lucacasonato lucacasonato marked this pull request as ready for review December 10, 2024 13:12
Copy link
Collaborator

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

LGTM

@lucacasonato lucacasonato merged commit 65d61bd into main Dec 10, 2024
9 checks passed
@lucacasonato lucacasonato deleted the otel_tracing branch December 10, 2024 14:03
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