OpenTelemetry support #1128
Replies: 4 comments 8 replies
-
Thanks for the idea @KennethHoff! Do you think this would be do-able also as a third-party integration or are changes to Astro’s core required? I’m not familiar but looking quickly through the OpenTelemetry docs it looks like something a community member could kick off using the integration API. |
Beta Was this translation helpful? Give feedback.
-
I've had a bit of a think about this, and done a bit of research. I think it couldn't be done using an integration, and would need to be in Astro core. Essentially Astro would need to use the |
Beta Was this translation helpful? Give feedback.
-
We would like to advance this to stage 2, so I'm calling for a @withastro/tsc vote. 👍🏻 from me |
Beta Was this translation helpful? Give feedback.
-
Closing in favour of #1208 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Modern websites needs telemetry to be able to understand what's going on, and there is no way of doing that than OpenTelemetry.
I realize that AstroJS is a Static Site Generator and it's the adapters' job to implement the runtime portions, but in order to make it easier for them to implement, an abstraction is needed, and OpenTelemetry is actually surprisingly useful even in local development, as it makes it trivial to determine performance bottlenecks due to duration-tracking functionality of Spans.
Background & Motivation
Distributed tracing makes it makes it very easy to figure out performance bottlenecks as well make it easier to figure out where errors are coming from, and OpenTelemetry (Otel) is a standard for Distributed Tracing.
Next.js has very good built-in support for OpenTelemetry through the @vercel/otel package.
Goals
@astrojs/opentelemetry
that enables OpenTelemetry in an Astro application.Example
Create a new integration,
@astrojs/opentelemetry
that can be used like this:The
opentelemetry
function would allow you to configure these options, which would default to reading these environment variablesBeta Was this translation helpful? Give feedback.
All reactions