#Trigger.dev + Axiom OTLP Traces Integration Issue

1 messages · Page 1 of 1 (latest)

minor rainBOT
#

Hi @young dagger. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I can help with your Trigger.dev and Axiom OTLP traces integration issue. Based on the knowledge sources, I can see that Trigger.dev does support custom exporters for telemetry data, including sending to Axiom.

Looking at your configuration, I notice a few potential issues:

  1. The example in the Trigger.dev documentation uses OTLPTraceExporter from @opentelemetry/exporter-trace-otlp-proto, but you're using it from @opentelemetry/exporter-trace-otlp-http. This could be causing compatibility issues.

  2. Your configuration structure seems slightly different from the example in the documentation.

Here's how the Trigger.dev documentation suggests configuring an Axiom exporter:

import { defineConfig } from "@trigger.dev/sdk/v3";
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';

// Initialize OTLP trace exporter with the endpoint URL and headers
const axiomExporter = new OTLPTraceExporter({
  url: '<https://api.axiom.co/v1/traces',>
  headers: {
    'Authorization': `Bearer ${process.env.AXIOM_API_TOKEN}`,
    'X-Axiom-Dataset': process.env.AXIOM_DATASET
  },
});

export default defineConfig({
  project: "<project ref>",
  // Your other config settings...
  telemetry: {
    instrumentations: [
      // Your instrumentations here
    ],
    exporters: [axiomExporter],
  },
});

The trigger.config.ts file

Try modifying your configuration to match this structure more closely:

  1. Switch to using @opentelemetry/exporter-trace-otlp-proto instead of the HTTP variant
  2. Make sure your telemetry configuration is at the top level of the defineConfig object, not inside a build property

Also, ensure that your environment variables AXIOM_API_TOKEN and AXIOM_DATASET are properly set in your project environment.

#

If you continue to experience issues, you might want to enable debug logging when running your Trigger.dev commands to get more detailed information:

npx trigger.dev@latest dev --log-level debug

CLI login command

This should provide more insight into what's happening with the telemetry configuration and export process.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: