Skip to main content

Simple support for Observability tools (e.g. Sentry, DataDog, Axiom, etc)

These tools typically require code to be inserted extremely early in the code execution order because they automatically instrument other modules.

It might be technically possible to write an ESBuild plugin that works with Trigger.dev (we support those via extensions) but it won’t be trivial. We should add an easy way to use these tools.

5 comments

Comments5

  • Yuri

    •

    Jan 15

    Yeah i have spent so many days trying to make Sentry OTEL work well. You can currently make traces work with Sentry with very limited functionality through exporter like so:

    ```
    const sentryOtelExporter = new OTLPTraceExporter({

    url: process.env.SENTRY_OTLP_TRACES_ENDPOINT,

    headers: {

    'x-sentry-auth': process.env.SENTRY_OTLP_AUTH_HEADER ?? '',

    },

    })
    ```

    And then

    ```
    telemetry: {

    instrumentations: [new HttpInstrumentation()],

    exporters: [sentryOtelExporter],

    },
    ```

    And adding `skipOpenTelemetrySetup: true,` to Sentry.init

    But this method is very limited. A lot of span info is not sent, and any Sentry integration that modifies spans like `vercelAitIntegration` doesn’t work. Would be great to have this working

  • An Anonymous User

    •

    Jan 13

    The problem is that trigger dev registers OTEL so other tools can’t, and trigger.dev doesn’t allow to be used as spanProcessor instead of a provider, because then we could pass it to Sentry’s `openTelemetrySpanProcessors` and let Sentry do the Otel setup and.

    In case of Sentry currently the only way is to pass it as Exporter, but then many features are dropped like span events and custom sentry integrations (aiSdkIntegration etc).

    https://docs.sentry.io/concepts/otlp/

    So yeah it sucks right now

    • Yuri

      •

      Jan 17

      I feel like if in addition to `exporters` trigger.dev would allow to pass `spanProcessors`, then it would be much easier to request Sentry to export a custom spanProcessor wrapper that adds all the integration span changes (like vercel ai sdk span/attributes changes they do in the integration)

  • An Anonymous User

    •

    Jul 10, 2025

    Yeah, right now trying to use pino-transport-datadog and having issue running the worker inside trigger tasks, Seems like the http route is my best option for now

  • An Anonymous User

    •

    Nov 23, 2024

    freak