#Trigger.dev + Axiom OTLP Traces Integration Issue
1 messages · Page 1 of 1 (latest)
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:
-
The example in the Trigger.dev documentation uses
OTLPTraceExporterfrom@opentelemetry/exporter-trace-otlp-proto, but you're using it from@opentelemetry/exporter-trace-otlp-http. This could be causing compatibility issues. -
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],
},
});
Try modifying your configuration to match this structure more closely:
- Switch to using
@opentelemetry/exporter-trace-otlp-protoinstead of the HTTP variant - Make sure your
telemetryconfiguration is at the top level of thedefineConfigobject, not inside abuildproperty
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