-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hey there, we have been using DD with this package for over an year, we are running it with the latest version, but now we found an issue where the dbmPropagationMode setting is not working.
We have it set at our tracing.ts file
import tracer from 'dd-trace'
import { getEnvironment } from './utils'
export const getDDEnvVar = () => {
const runningEnv = getEnvironment() !== 'production' ? 'dev' : 'production'
return process.env.DD_ENV ?? runningEnv
}
const isPorter = !!process.env.PORTER_APP_SERVICE_NAME
if (isPorter) {
tracer.init({
logInjection: true,
profiling: true,
env: getDDEnvVar(),
version: process.env.PORTER_POD_IMAGE_TAG ?? 'local',
runtimeMetrics: true,
dbmPropagationMode: 'full',
})
} else {
//Keep legacy for Render
tracer.init({
// https://docs.datadoghq.com/tracing/connect_logs_and_traces/nodejs/
hostname: process.env.DD_AGENT_HOST_NAME ?? 'localhost',
port: 8126,
logInjection: true,
profiling: true,
env: getDDEnvVar(),
version: process.env.RENDER_GIT_BRANCH ?? 'local',
runtimeMetrics: true,
dbmPropagationMode: 'full',
})
}
export default tracerNote: we need to support two different providers
This is the setting:
https://docs.datadoghq.com/database_monitoring/connect_dbm_and_apm/?tab=nodejs&site=us5
But notice how it is not enabled in the dd config init:
{
"date": "2024-05-24T15:20:43.474Z",
"os_name": "Linux",
"os_version": "5.15.154+",
"architecture": "x64",
"version": "5.14.1",
"lang": "nodejs",
"lang_version": "20.10.0",
"env": "porter-dev",
"service": "traba-server-node",
"agent_url": "http://10.129.0.57:8126/",
"debug": false,
"sampling_rules": [],
"tags": {
"service": "traba-server-node",
"env": "porter-dev",
"version": "latest",
"runtime-id": "58310bd9-b04b-4a7a-9899-1c832561157d"
},
"dd_version": "latest",
"log_injection_enabled": true,
"runtime_metrics_enabled": true,
"profiling_enabled": true,
"integrations_loaded": [
"fetch",
"child_process",
"net",
"dns",
"http",
"winston",
"http2",
"aws-sdk",
"ioredis",
"amqplib",
"openai",
"express",
"grpc"
],
"appsec_enabled": false
}We also tried enabling it using an Env, no luck.
Metadata
Metadata
Assignees
Labels
No labels