diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abc0ce9358..b44876cb6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - build - tests + - shared-pipeline - deploy - ci-build @@ -17,6 +18,7 @@ include: - project: DataDog/apm-reliability/libdatadog-build ref: 5826819695d93286569e70ed087ae6bf906ce2c3 file: templates/ci_authenticated_job.yml + - local: .gitlab/one-pipeline.locked.yml - local: .gitlab/ci-images.yml generate-templates: @@ -95,3 +97,17 @@ package-trigger: GIT_SUBMODULE_PATHS: libdatadog appsec/third_party/cpp-base64 appsec/third_party/libddwaf appsec/third_party/msgpack-c NIGHTLY_BUILD: $NIGHTLY_BUILD RELIABILITY_ENV_BRANCH: $RELIABILITY_ENV_BRANCH + +validate_supported_configurations_v2_local_file: + extends: .validate_supported_configurations_v2_local_file + variables: + LOCAL_JSON_PATH: "metadata/supported-configurations.json" + BACKFILLED: "true" + +update_central_configurations_version_range_v2: + extends: .update_central_configurations_version_range_v2 + variables: + LOCAL_REPO_NAME: "dd-trace-php" + LOCAL_JSON_PATH: "metadata/supported-configurations.json" + LANGUAGE_NAME: "php" + MULTIPLE_RELEASE_LINES: "false" diff --git a/.gitlab/generate-shared.php b/.gitlab/generate-shared.php index bc7a669b79..db364b0e8c 100644 --- a/.gitlab/generate-shared.php +++ b/.gitlab/generate-shared.php @@ -116,6 +116,19 @@ - artifacts when: "always" +"Config Verification Test": + tags: [ "arch:amd64" ] + stage: test + needs: [] + image: "registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_bookworm-6" + script: + - bash tooling/generate-supported-configurations.sh + - if ! git diff --exit-code -- metadata/supported-configurations.json ext/configuration.h; then + echo "ERROR: @metadata/supported-configurations.json got out of sync with implemented configurations. Please run tooling/generate-supported-configurations.sh locally." + git --no-pager diff -- metadata/supported-configurations.json ext/configuration.h + exit 1 + fi + 0) { + if (ZSTR_LEN(hostname) > 0 && zai_config_memoized_entries[DDTRACE_CONFIG_DD_AGENT_HOST].name_index != ZAI_CONFIG_ORIGIN_DEFAULT) { bool isIPv6 = memchr(ZSTR_VAL(hostname), ':', ZSTR_LEN(hostname)); int64_t port = get_global_DD_TRACE_AGENT_PORT(); diff --git a/ext/configuration.h b/ext/configuration.h index 8984674f68..97b9787560 100644 --- a/ext/configuration.h +++ b/ext/configuration.h @@ -51,7 +51,7 @@ enum ddtrace_sampling_rules_format { #define DD_TRACE_AGENT_FLUSH_INTERVAL_VAL 1001 #define DD_INTEGRATION_ANALYTICS_ENABLED_DEFAULT false -#define DD_INTEGRATION_ANALYTICS_SAMPLE_RATE_DEFAULT 1 +#define DD_INTEGRATION_ANALYTICS_SAMPLE_RATE_DEFAULT 1.0 #if PHP_VERSION_ID >= 80300 || defined(_WIN32) #define DD_SIDECAR_TRACE_SENDER_DEFAULT true @@ -100,12 +100,12 @@ enum ddtrace_sampling_rules_format { CONFIG(STRING, DD_TRACE_SOURCES_PATH, DD_DEFAULT_SOURCES_PATH, .ini_change = zai_config_system_ini_change) \ CONFIG(BOOL, DD_AUTOLOAD_NO_COMPILE, "false", .ini_change = zai_config_system_ini_change) \ CONFIG(STRING, DD_TRACE_AGENT_URL, "", .ini_change = zai_config_system_ini_change) \ - CONFIG(STRING, DD_AGENT_HOST, "", .ini_change = zai_config_system_ini_change) \ - CONFIG(STRING, DD_DOGSTATSD_URL, "") \ - CONFIG(STRING, DD_DOGSTATSD_HOST, "") \ + CONFIG(STRING, DD_AGENT_HOST, "localhost", .ini_change = zai_config_system_ini_change) \ + CONFIG(STRING, DD_DOGSTATSD_URL, "http://localhost:8125") \ + CONFIG(STRING, DD_DOGSTATSD_HOST, "localhost") \ CONFIG(STRING, DD_API_KEY, "", .ini_change = zai_config_system_ini_change) \ CONFIG(BOOL, DD_DISTRIBUTED_TRACING, "true") \ - CONFIG(STRING, DD_DOGSTATSD_PORT, "8125") \ + CONFIG(INT, DD_DOGSTATSD_PORT, "8125") \ CONFIG(STRING, DD_ENV, "", .ini_change = ddtrace_alter_dd_env, \ .env_config_fallback = ddtrace_conf_otel_resource_attributes_env) \ CONFIG(BOOL, DD_AUTOFINISH_SPANS, "false") \ @@ -114,10 +114,10 @@ enum ddtrace_sampling_rules_format { CONFIG(STRING, DD_SERVICE, "", .ini_change = ddtrace_alter_dd_service, \ .env_config_fallback = ddtrace_conf_otel_service_name) \ CONFIG(MAP, DD_SERVICE_MAPPING, "") \ - CONFIG(CUSTOM(MAP), DD_TAGS, "", \ + CONFIG(CUSTOM(MAP), DD_TAGS, "", \ .env_config_fallback = ddtrace_conf_otel_resource_attributes_tags, \ - .parser = dd_parse_tags) \ - CONFIG(INT, DD_TRACE_AGENT_PORT, "0", .ini_change = zai_config_system_ini_change) \ + .parser = dd_parse_tags) \ + CONFIG(INT, DD_TRACE_AGENT_PORT, "8126", .ini_change = zai_config_system_ini_change) \ CONFIG(BOOL, DD_TRACE_ANALYTICS_ENABLED, "false") \ CONFIG(BOOL, DD_TRACE_APPEND_TRACE_IDS_TO_LOGS, "false") \ CONFIG(BOOL, DD_TRACE_AUTO_FLUSH_ENABLED, "false") /* true in CLI */ \ @@ -177,7 +177,7 @@ enum ddtrace_sampling_rules_format { CONFIG(SET_LOWERCASE, DD_TRACE_PROPAGATION_STYLE_INJECT, "datadog,tracecontext,baggage") \ CONFIG(SET_LOWERCASE, DD_TRACE_PROPAGATION_STYLE, "datadog,tracecontext,baggage", \ .env_config_fallback = ddtrace_conf_otel_propagators) \ - CONFIG(SET, DD_TRACE_BAGGAGE_TAG_KEYS, "user.id,session.id,account.id") \ + CONFIG(SET, DD_TRACE_BAGGAGE_TAG_KEYS, "user.id, session.id, account.id") \ CONFIG(BOOL, DD_TRACE_IGNORE_AGENT_SAMPLING_RATES, "false", .ini_change = zai_config_system_ini_change) \ CONFIG(SET, DD_TRACE_TRACED_INTERNAL_FUNCTIONS, "") \ CONFIG(INT, DD_TRACE_AGENT_TIMEOUT, DD_CFG_EXPSTR(DD_TRACE_AGENT_TIMEOUT_VAL), \ @@ -190,7 +190,7 @@ enum ddtrace_sampling_rules_format { CONFIG(BOOL, DD_TRACE_GENERATE_ROOT_SPAN, "true", .ini_change = ddtrace_span_alter_root_span_config) \ CONFIG(INT, DD_TRACE_SPANS_LIMIT, "1000") \ CONFIG(BOOL, DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED, "true") \ - CONFIG(BOOL, DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED, "true") \ + CONFIG(BOOL, DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED, "true") \ CONFIG(INT, DD_TRACE_BGS_CONNECT_TIMEOUT, DD_CFG_EXPSTR(DD_TRACE_BGS_CONNECT_TIMEOUT_VAL), \ .ini_change = zai_config_system_ini_change) \ CONFIG(INT, DD_TRACE_BGS_TIMEOUT, DD_CFG_EXPSTR(DD_TRACE_BGS_TIMEOUT_VAL), \ @@ -248,8 +248,8 @@ enum ddtrace_sampling_rules_format { CONFIG(BOOL, DD_TRACE_WEBSOCKET_MESSAGES_INHERIT_SAMPLING, "true") \ CONFIG(BOOL, DD_TRACE_WEBSOCKET_MESSAGES_SEPARATE_TRACES, "true") \ CONFIG(BOOL, DD_INJECT_FORCE, "false", .ini_change = zai_config_system_ini_change) \ - CONFIG(DOUBLE, DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS, "5", .ini_change = zai_config_system_ini_change) \ - CONFIG(BOOL, DD_REMOTE_CONFIG_ENABLED, "true", .ini_change = zai_config_system_ini_change) \ + CONFIG(DOUBLE, DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS, "5.0", .ini_change = zai_config_system_ini_change) \ + CONFIG(BOOL, DD_REMOTE_CONFIG_ENABLED, "true", .ini_change = zai_config_system_ini_change) \ CONFIG(BOOL, DD_DYNAMIC_INSTRUMENTATION_ENABLED, "false", .ini_change = ddtrace_alter_dynamic_instrumentation_config) \ CONFIG(SET, DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS, "", .ini_change = zai_config_system_ini_change) \ CONFIG(BOOL, DD_APM_TRACING_ENABLED, "true") \ @@ -257,7 +257,7 @@ enum ddtrace_sampling_rules_format { CONFIG(INT, DD_TRACE_BAGGAGE_MAX_ITEMS, "64") \ CONFIG(INT, DD_TRACE_BAGGAGE_MAX_BYTES, "8192") \ CONFIG(BOOL, DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED, "false") \ - CONFIG(SET, DD_TRACE_HTTP_CLIENT_ERROR_STATUSES, "500-599", .ini_change = zai_config_system_ini_change) \ + CONFIG(SET, DD_TRACE_HTTP_CLIENT_ERROR_STATUSES, "400-499", .ini_change = zai_config_system_ini_change) \ CONFIG(SET, DD_TRACE_HTTP_SERVER_ERROR_STATUSES, "500-599", .ini_change = zai_config_system_ini_change) \ CONFIG(BOOL, DD_CODE_ORIGIN_FOR_SPANS_ENABLED, "true", .ini_change = ddtrace_alter_DD_CODE_ORIGIN_FOR_SPANS_ENABLED) \ CONFIG(INT, DD_CODE_ORIGIN_MAX_USER_FRAMES, "8") \ diff --git a/ext/dogstatsd.c b/ext/dogstatsd.c index 2560214f24..5a00903926 100644 --- a/ext/dogstatsd.c +++ b/ext/dogstatsd.c @@ -9,13 +9,17 @@ ZEND_EXTERN_MODULE_GLOBALS(ddtrace); char *ddtrace_dogstatsd_url(void) { zend_string *url = get_DD_DOGSTATSD_URL(); - if (ZSTR_LEN(url) > 0) { + if (ZSTR_LEN(url) > 0 && zai_config_memoized_entries[DDTRACE_CONFIG_DD_DOGSTATSD_URL].name_index != ZAI_CONFIG_ORIGIN_DEFAULT) { return zend_strndup(ZSTR_VAL(url), ZSTR_LEN(url) + 1); } zend_string *hostname = get_DD_DOGSTATSD_HOST(); - if (ZSTR_LEN(hostname) == 0) { - hostname = get_global_DD_AGENT_HOST(); + if (ZSTR_LEN(hostname) == 0 || zai_config_memoized_entries[DDTRACE_CONFIG_DD_DOGSTATSD_HOST].name_index == ZAI_CONFIG_ORIGIN_DEFAULT) { + if (zai_config_memoized_entries[DDTRACE_CONFIG_DD_AGENT_HOST].name_index == ZAI_CONFIG_ORIGIN_DEFAULT) { + hostname = ZSTR_EMPTY_ALLOC(); + } else { + hostname = get_global_DD_AGENT_HOST(); + } } if (ZSTR_LEN(hostname) > 7 && strncmp(ZSTR_VAL(hostname), "unix://", 7) == 0) { @@ -25,7 +29,7 @@ char *ddtrace_dogstatsd_url(void) { if (ZSTR_LEN(hostname) > 0) { bool isIPv6 = memchr(ZSTR_VAL(hostname), ':', ZSTR_LEN(hostname)); - int port = atoi(ZSTR_VAL(get_DD_DOGSTATSD_PORT())); + int port = get_DD_DOGSTATSD_PORT(); if (port <= 0 || port > 65535) { port = 8125; } @@ -39,7 +43,7 @@ char *ddtrace_dogstatsd_url(void) { } int64_t port = get_global_DD_TRACE_AGENT_PORT(); - if (port <= 0 || port > 65535) { + if (port <= 0 || port > 65535 || zai_config_memoized_entries[DDTRACE_CONFIG_DD_TRACE_AGENT_PORT].name_index == ZAI_CONFIG_ORIGIN_DEFAULT) { port = 8125; } char *formatted_url; diff --git a/metadata/supported-configurations.json b/metadata/supported-configurations.json new file mode 100644 index 0000000000..0ec7e445c8 --- /dev/null +++ b/metadata/supported-configurations.json @@ -0,0 +1,2604 @@ +{ + "version": "2", + "supportedConfigurations": { + "DD_AGENT_HOST": [ + { + "implementation": "A", + "type": "string", + "default": "localhost" + } + ], + "DD_API_KEY": [ + { + "implementation": "C", + "type": "string", + "default": "" + } + ], + "DD_API_SECURITY_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_API_SECURITY_SAMPLE_DELAY": [ + { + "implementation": "A", + "type": "decimal", + "default": "30.0" + } + ], + "DD_APM_TRACING_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE": [ + { + "implementation": "D", + "type": "string", + "default": "ident", + "aliases": [ + "DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING" + ] + } + ], + "DD_APPSEC_CLI_START_ON_RINIT": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_EXTRA_HEADERS": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_APPSEC_HELPER_LAUNCH": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_HELPER_LOG_FILE": [ + { + "implementation": "A", + "type": "string", + "default": "/dev/null" + } + ], + "DD_APPSEC_HELPER_LOG_LEVEL": [ + { + "implementation": "A", + "type": "string", + "default": "info" + } + ], + "DD_APPSEC_HELPER_PATH": [ + { + "implementation": "A", + "type": "string", + "default": "/opt/datadog-php/" + } + ], + "DD_APPSEC_HELPER_RUNTIME_PATH": [ + { + "implementation": "A", + "type": "string", + "default": "/tmp" + } + ], + "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML": [ + { + "implementation": "C", + "type": "string", + "default": "" + } + ], + "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON": [ + { + "implementation": "C", + "type": "string", + "default": "" + } + ], + "DD_APPSEC_LOG_FILE": [ + { + "implementation": "A", + "type": "string", + "default": "php_error_reporting" + } + ], + "DD_APPSEC_LOG_LEVEL": [ + { + "implementation": "A", + "type": "string", + "default": "warn" + } + ], + "DD_APPSEC_MAX_BODY_BUFF_SIZE": [ + { + "implementation": "A", + "type": "int", + "default": "524288" + } + ], + "DD_APPSEC_MAX_STACK_TRACES": [ + { + "implementation": "A", + "type": "int", + "default": "2" + } + ], + "DD_APPSEC_MAX_STACK_TRACE_DEPTH": [ + { + "implementation": "A", + "type": "int", + "default": "32" + } + ], + "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP": [ + { + "implementation": "B", + "type": "string", + "default": "(?i)pass|pw(?:or)?d|secret|(?:api|private|public|access)[_-]?key|token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)|bearer|authorization|jsessionid|phpsessid|asp\\.net[_-]sessionid|sid|jwt" + } + ], + "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP": [ + { + "implementation": "B", + "type": "string", + "default": "(?i)(?:p(?:ass)?w(?:or)?d|pass(?:[_-]?phrase)?|secret(?:[_-]?key)?|(?:(?:api|private|public|access)[_-]?)key(?:[_-]?id)?|(?:(?:auth|access|id|refresh)[_-]?)?token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|jsessionid|phpsessid|asp\\.net(?:[_-]|-)sessionid|sid|jwt)(?:\\s*=([^;&]+)|\"\\s*:\\s*(\"[^\"]+\"|\\d+))|bearer\\s+([a-z0-9\\._\\-]+)|token\\s*:\\s*([a-z0-9]{13})|gh[opsu]_([0-9a-zA-Z]{36})|ey[I-L][\\w=-]+\\.(ey[I-L][\\w=-]+(?:\\.[\\w.+\\/=-]+)?)|[\\-]{5}BEGIN[a-z\\s]+PRIVATE\\sKEY[\\-]{5}([^\\-]+)[\\-]{5}END[a-z\\s]+PRIVATE\\sKEY|ssh-rsa\\s*([a-z0-9\\/\\.+]{100,})" + } + ], + "DD_APPSEC_RASP_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_RULES": [ + { + "implementation": "C", + "type": "string", + "default": "" + } + ], + "DD_APPSEC_SCA_ENABLED": [ + { + "implementation": "C", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_STACK_TRACE_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_TESTING": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_TESTING_ABORT_RINIT": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_TESTING_HELPER_METRICS": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_TESTING_RAW_BODY": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_TRACE_RATE_LIMIT": [ + { + "implementation": "A", + "type": "int", + "default": "100" + } + ], + "DD_APPSEC_WAF_TIMEOUT": [ + { + "implementation": "D", + "type": "int", + "default": "10000" + } + ], + "DD_AUTOFINISH_SPANS": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_AUTOLOAD_NO_COMPILE": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_CODE_ORIGIN_FOR_SPANS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_CODE_ORIGIN_MAX_USER_FRAMES": [ + { + "implementation": "A", + "type": "int", + "default": "8" + } + ], + "DD_CRASHTRACKING_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_DBM_PROPAGATION_MODE": [ + { + "implementation": "A", + "type": "string", + "default": "disabled" + } + ], + "DD_DISTRIBUTED_TRACING": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_DOGSTATSD_HOST": [ + { + "implementation": "A", + "type": "string", + "default": "localhost" + } + ], + "DD_DOGSTATSD_PORT": [ + { + "implementation": "A", + "type": "int", + "default": "8125" + } + ], + "DD_DOGSTATSD_URL": [ + { + "implementation": "A", + "type": "string", + "default": "http://localhost:8125" + } + ], + "DD_DYNAMIC_INSTRUMENTATION_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_ENV": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_EXCEPTION_REPLAY_CAPTURE_INTERVAL_SECONDS": [ + { + "implementation": "A", + "type": "int", + "default": "3600" + } + ], + "DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES": [ + { + "implementation": "C", + "type": "int", + "default": "-1" + } + ], + "DD_EXCEPTION_REPLAY_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_EXTRA_SERVICES": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_GIT_COMMIT_SHA": [ + { + "implementation": "B", + "type": "string", + "default": "" + } + ], + "DD_GIT_REPOSITORY_URL": [ + { + "implementation": "B", + "type": "string", + "default": "" + } + ], + "DD_HOSTNAME": [ + { + "implementation": "B", + "type": "string", + "default": "" + } + ], + "DD_HTTP_SERVER_ROUTE_BASED_NAMING": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_INJECT_FORCE": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_INSTRUMENTATION_TELEMETRY_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_INTEGRATION_METRICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_LOG_BACKTRACE": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_METRICS_OTEL_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_OPENAI_LOGS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_OPENAI_LOG_PROMPT_COMPLETION_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "0.1" + } + ], + "DD_OPENAI_METRICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_OPENAI_SERVICE": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_OPENAI_SPAN_CHAR_LIMIT": [ + { + "implementation": "A", + "type": "int", + "default": "128" + } + ], + "DD_OPENAI_SPAN_PROMPT_COMPLETION_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0" + } + ], + "DD_PROFILING_ALLOCATION_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "true" + } + ], + "DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE": [ + { + "implementation": "A", + "type": "int", + "default": "4194304" + } + ], + "DD_PROFILING_ENABLED": [ + { + "implementation": "D", + "type": "boolean", + "default": "true" + } + ], + "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_PROFILING_EXCEPTION_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_PROFILING_EXCEPTION_MESSAGE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_PROFILING_EXCEPTION_SAMPLING_DISTANCE": [ + { + "implementation": "A", + "type": "int", + "default": "100" + } + ], + "DD_PROFILING_EXPERIMENTAL_CPU_TIME_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true", + "aliases": [ + "DD_PROFILING_EXPERIMENTAL_CPU_ENABLED" + ] + } + ], + "DD_PROFILING_EXPERIMENTAL_FEATURES_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_PROFILING_EXPERIMENTAL_IO_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_PROFILING_LOG_LEVEL": [ + { + "implementation": "A", + "type": "string", + "default": "off" + } + ], + "DD_PROFILING_OUTPUT_PPROF": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_PROFILING_TIMELINE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_PROFILING_WALLTIME_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "true" + } + ], + "DD_REMOTE_CONFIG_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": [ + { + "implementation": "A", + "type": "decimal", + "default": "5.0" + } + ], + "DD_SERVICE": [ + { + "implementation": "F", + "type": "string", + "default": "" + } + ], + "DD_SERVICE_MAPPING": [ + { + "implementation": "C", + "type": "map", + "default": "" + } + ], + "DD_SPAN_SAMPLING_RULES": [ + { + "implementation": "A", + "type": "array", + "default": "[]" + } + ], + "DD_SPAN_SAMPLING_RULES_FILE": [ + { + "implementation": "B", + "type": "string", + "default": "" + } + ], + "DD_TAGS": [ + { + "implementation": "A", + "type": "map", + "default": "" + } + ], + "DD_TELEMETRY_HEARTBEAT_INTERVAL": [ + { + "implementation": "C", + "type": "int", + "default": "60" + } + ], + "DD_TELEMETRY_LOG_COLLECTION_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_AGENTLESS": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_AGENT_CONNECT_TIMEOUT": [ + { + "implementation": "A", + "type": "int", + "default": "100" + } + ], + "DD_TRACE_AGENT_DEBUG_VERBOSE_CURL": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_AGENT_FLUSH_AFTER_N_REQUESTS": [ + { + "implementation": "A", + "type": "int", + "default": "0" + } + ], + "DD_TRACE_AGENT_FLUSH_INTERVAL": [ + { + "implementation": "A", + "type": "int", + "default": "1001" + } + ], + "DD_TRACE_AGENT_MAX_PAYLOAD_SIZE": [ + { + "implementation": "A", + "type": "int", + "default": "52428800" + } + ], + "DD_TRACE_AGENT_PORT": [ + { + "implementation": "A", + "type": "int", + "default": "8126" + } + ], + "DD_TRACE_AGENT_RETRIES": [ + { + "implementation": "A", + "type": "int", + "default": "0" + } + ], + "DD_TRACE_AGENT_STACK_BACKLOG": [ + { + "implementation": "A", + "type": "int", + "default": "12" + } + ], + "DD_TRACE_AGENT_STACK_INITIAL_SIZE": [ + { + "implementation": "A", + "type": "int", + "default": "131072" + } + ], + "DD_TRACE_AGENT_TEST_SESSION_TOKEN": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_TRACE_AGENT_TIMEOUT": [ + { + "implementation": "B", + "type": "int", + "default": "500" + } + ], + "DD_TRACE_AGENT_URL": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_TRACE_AMQP_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_AMQP_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_AMQP_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_AMQP_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_AMQP_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_ANALYTICS_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_APPEND_TRACE_IDS_TO_LOGS": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_AUTO_FLUSH_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_BAGGAGE_MAX_BYTES": [ + { + "implementation": "A", + "type": "int", + "default": "8192" + } + ], + "DD_TRACE_BAGGAGE_MAX_ITEMS": [ + { + "implementation": "A", + "type": "int", + "default": "64" + } + ], + "DD_TRACE_BAGGAGE_TAG_KEYS": [ + { + "implementation": "A", + "type": "array", + "default": "user.id, session.id, account.id" + } + ], + "DD_TRACE_BETA_HIGH_MEMORY_PRESSURE_PERCENT": [ + { + "implementation": "A", + "type": "int", + "default": "80" + } + ], + "DD_TRACE_BGS_CONNECT_TIMEOUT": [ + { + "implementation": "A", + "type": "int", + "default": "2000" + } + ], + "DD_TRACE_BGS_TIMEOUT": [ + { + "implementation": "A", + "type": "int", + "default": "5000" + } + ], + "DD_TRACE_BUFFER_SIZE": [ + { + "implementation": "B", + "type": "int", + "default": "2097152" + } + ], + "DD_TRACE_CAKEPHP_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_CAKEPHP_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_CAKEPHP_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_CAKEPHP_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_CAKEPHP_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_CLIENT_IP_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_CLIENT_IP_HEADER": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_TRACE_CLI_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_CODEIGNITER_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_CODEIGNITER_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_CODEIGNITER_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_CODEIGNITER_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_CODEIGNITER_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_CURL_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_CURL_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_CURL_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_CURL_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_CURL_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_DB_CLIENT_SPLIT_BY_INSTANCE": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_DEBUG": [ + { + "implementation": "B", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_DEBUG_CURL_OUTPUT": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_DEBUG_PRNG_SEED": [ + { + "implementation": "A", + "type": "int", + "default": "-1" + } + ], + "DD_TRACE_DRUPAL_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_DRUPAL_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_DRUPAL_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_DRUPAL_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_DRUPAL_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_ELASTICSEARCH_ANALYTICS_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_ELASTICSEARCH_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_ELASTICSEARCH_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_ELASTICSEARCH_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_ELASTICSEARCH_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_ELOQUENT_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_ELOQUENT_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_ELOQUENT_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_ELOQUENT_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_ELOQUENT_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_EXEC_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_EXEC_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_EXEC_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_EXEC_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_EXEC_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_FILESYSTEM_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_FILESYSTEM_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_FILESYSTEM_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_FILESYSTEM_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_FILESYSTEM_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_FLUSH_COLLECT_CYCLES": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_FORCE_FLUSH_ON_SHUTDOWN": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_FORCE_FLUSH_ON_SIGINT": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_FORCE_FLUSH_ON_SIGTERM": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_FORKED_PROCESS": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_FRANKENPHP_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_FRANKENPHP_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_FRANKENPHP_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_FRANKENPHP_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_FRANKENPHP_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_GENERATE_ROOT_SPAN": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_GIT_METADATA_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_GOOGLESPANNER_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_GOOGLESPANNER_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_GOOGLESPANNER_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_GOOGLESPANNER_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_GOOGLESPANNER_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_GUZZLE_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_GUZZLE_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_GUZZLE_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_GUZZLE_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_GUZZLE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_HEADER_TAGS": [ + { + "implementation": "B", + "type": "map", + "default": "" + } + ], + "DD_TRACE_HEALTH_METRICS_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_HEALTH_METRICS_HEARTBEAT_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "0.001" + } + ], + "DD_TRACE_HOOK_LIMIT": [ + { + "implementation": "A", + "type": "int", + "default": "100" + } + ], + "DD_TRACE_HTTPSTREAM_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_HTTPSTREAM_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_HTTPSTREAM_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_HTTPSTREAM_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_HTTPSTREAM_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_HTTP_CLIENT_ERROR_STATUSES": [ + { + "implementation": "B", + "type": "array", + "default": "400-499" + } + ], + "DD_TRACE_HTTP_CLIENT_SPLIT_BY_DOMAIN": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_HTTP_POST_DATA_PARAM_ALLOWED": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_HTTP_SERVER_ERROR_STATUSES": [ + { + "implementation": "C", + "type": "array", + "default": "500-599" + } + ], + "DD_TRACE_HTTP_URL_QUERY_PARAM_ALLOWED": [ + { + "implementation": "A", + "type": "array", + "default": "*" + } + ], + "DD_TRACE_IGNORE_AGENT_SAMPLING_RATES": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_KAFKA_ANALYTICS_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_KAFKA_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_KAFKA_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_KAFKA_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_KAFKA_DISTRIBUTED_TRACING": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_KAFKA_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_LAMINAS_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_LAMINAS_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_LAMINAS_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_LAMINAS_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_LAMINAS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_LARAVELQUEUE_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_LARAVELQUEUE_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_LARAVELQUEUE_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_LARAVELQUEUE_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_LARAVELQUEUE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_LARAVEL_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_LARAVEL_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_LARAVEL_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_LARAVEL_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_LARAVEL_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_LARAVEL_QUEUE_DISTRIBUTED_TRACING": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_LOGS_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_LOGS_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_LOGS_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_LOGS_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_LOGS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true", + "aliases": [ + "DD_LOGS_INJECTION" + ] + } + ], + "DD_TRACE_LOG_FILE": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_TRACE_LOG_LEVEL": [ + { + "implementation": "B", + "type": "string", + "default": "error" + } + ], + "DD_TRACE_LUMEN_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_LUMEN_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_LUMEN_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_LUMEN_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_LUMEN_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MAGENTO_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_MAGENTO_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_MAGENTO_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_MAGENTO_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_MAGENTO_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MEASURE_COMPILE_TIME": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MEASURE_PEAK_MEMORY_USAGE": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MEMCACHED_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_MEMCACHED_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_MEMCACHED_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_MEMCACHED_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_MEMCACHED_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MEMCACHED_OBFUSCATION": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MEMCACHE_ANALYTICS_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_MEMCACHE_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_MEMCACHE_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_MEMCACHE_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_MEMCACHE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MEMORY_LIMIT": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_TRACE_MONGODB_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_MONGODB_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_MONGODB_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_MONGODB_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_MONGODB_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MONGODB_OBFUSCATION": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MONGO_ANALYTICS_ENABLED": [ + { + "implementation": "B", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_MONGO_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_MONGO_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_MONGO_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_MONGO_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_MYSQLI_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_MYSQLI_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_MYSQLI_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_MYSQLI_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_MYSQLI_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_NETTE_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_NETTE_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_NETTE_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_NETTE_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_NETTE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP": [ + { + "implementation": "E", + "type": "string", + "default": "(?i)(?:(?:\"|%22)?)(?:(?:old[-_]?|new[-_]?)?p(?:ass)?w(?:or)?d(?:1|2)?|pass(?:[-_]?phrase)?|secret|(?:api[-_]?|private[-_]?|public[-_]?|access[-_]?|secret[-_]?|app(?:lication)?[-_]?)key(?:[-_]?id)?|token|consumer[-_]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:\"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:\"|%22)(?:%2[^2]|%[^2]|[^\"%])+(?:\"|%22))|(?:bearer(?:\\s|%20)+[a-z0-9._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+/=-]|%3D|%2F|%2B)+)?|-{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY-{5}[^\\-]+-{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY(?:-{5})?(?:\\n|%0A)?|(?:ssh-(?:rsa|dss)|ecdsa-[a-z0-9]+-[a-z0-9]+)(?:\\s|%20|%09)+(?:[a-z0-9/.+]|%2F|%5C|%2B){100,}(?:=|%3D)*(?:(?:\\s|%20|%09)+[a-z0-9._-]+)?)" + } + ], + "DD_TRACE_ONCE_LOGS": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_OPENAI_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_OPENAI_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_OPENAI_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_OPENAI_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_OPENAI_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_OTEL_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_PCNTL_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_PCNTL_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_PCNTL_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_PCNTL_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_PCNTL_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_PDO_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_PDO_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_PDO_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_PDO_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_PDO_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_PEER_SERVICE_MAPPING": [ + { + "implementation": "A", + "type": "map", + "default": "" + } + ], + "DD_TRACE_PHPREDIS_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_PHPREDIS_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_PHPREDIS_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_PHPREDIS_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_PHPREDIS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_PREDIS_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_PREDIS_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_PREDIS_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_PREDIS_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_PREDIS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_PROPAGATE_SERVICE": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_PROPAGATE_USER_ID_DEFAULT": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_PROPAGATION_STYLE": [ + { + "implementation": "D", + "type": "array", + "default": "datadog,tracecontext,baggage" + } + ], + "DD_TRACE_PROPAGATION_STYLE_EXTRACT": [ + { + "implementation": "E", + "type": "array", + "default": "datadog,tracecontext,B3,B3 single header,baggage" + } + ], + "DD_TRACE_PROPAGATION_STYLE_INJECT": [ + { + "implementation": "D", + "type": "array", + "default": "datadog,tracecontext,baggage" + } + ], + "DD_TRACE_PSR18_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_PSR18_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_PSR18_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_PSR18_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_PSR18_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_RATCHET_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_RATCHET_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_RATCHET_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_RATCHET_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_RATCHET_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_RATE_LIMIT": [ + { + "implementation": "A", + "type": "int", + "default": "100" + } + ], + "DD_TRACE_REDIS_CLIENT_SPLIT_BY_HOST": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_REMOVE_AUTOINSTRUMENTATION_ORPHANS": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_REMOVE_ROOT_SPAN_LARAVEL_QUEUE": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_REMOVE_ROOT_SPAN_SYMFONY_MESSENGER": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_REPORT_HOSTNAME": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_RESOURCE_RENAMING_ALWAYS_SIMPLIFIED_ENDPOINT": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_RESOURCE_RENAMING_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_RESOURCE_URI_FRAGMENT_REGEX": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_RESOURCE_URI_MAPPING_INCOMING": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_RESOURCE_URI_MAPPING_OUTGOING": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_RESOURCE_URI_QUERY_PARAM_ALLOWED": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_RETAIN_THREAD_CAPABILITIES": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_ROADRUNNER_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_ROADRUNNER_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_ROADRUNNER_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_ROADRUNNER_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_ROADRUNNER_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SAMPLE_RATE": [ + { + "implementation": "D", + "type": "decimal", + "default": "-1" + } + ], + "DD_TRACE_SAMPLING_RULES": [ + { + "implementation": "D", + "type": "array", + "default": "[]" + } + ], + "DD_TRACE_SAMPLING_RULES_FORMAT": [ + { + "implementation": "A", + "type": "string", + "default": "glob" + } + ], + "DD_TRACE_SHUTDOWN_TIMEOUT": [ + { + "implementation": "A", + "type": "int", + "default": "5000" + } + ], + "DD_TRACE_SIDECAR_TRACE_SENDER": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_SLIM_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_SLIM_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_SLIM_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_SLIM_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_SLIM_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SOURCES_PATH": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "DD_TRACE_SPANS_LIMIT": [ + { + "implementation": "A", + "type": "int", + "default": "1000" + } + ], + "DD_TRACE_SQLSRV_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_SQLSRV_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_SQLSRV_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_SQLSRV_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_SQLSRV_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_STARTUP_LOGS": [ + { + "implementation": "C", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SWOOLE_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_SWOOLE_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_SWOOLE_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_SWOOLE_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_SWOOLE_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SYMFONYMESSENGER_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_SYMFONYMESSENGER_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_SYMFONYMESSENGER_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_SYMFONYMESSENGER_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_SYMFONYMESSENGER_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SYMFONY_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_SYMFONY_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_SYMFONY_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_SYMFONY_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_SYMFONY_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SYMFONY_HTTP_ROUTE": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SYMFONY_MESSENGER_DISTRIBUTED_TRACING": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_SYMFONY_MESSENGER_MIDDLEWARES": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_TRACE_TRACED_INTERNAL_FUNCTIONS": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_URL_AS_RESOURCE_NAMES_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WARN_LEGACY_DD_TRACE": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WEBSOCKET_MESSAGES_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WEBSOCKET_MESSAGES_INHERIT_SAMPLING": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WEBSOCKET_MESSAGES_SEPARATE_TRACES": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WEB_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_WEB_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_WEB_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_WEB_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_WEB_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WORDPRESS_ADDITIONAL_ACTIONS": [ + { + "implementation": "A", + "type": "array", + "default": "" + } + ], + "DD_TRACE_WORDPRESS_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_WORDPRESS_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_WORDPRESS_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_WORDPRESS_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_WORDPRESS_CALLBACKS": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_WORDPRESS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH": [ + { + "implementation": "A", + "type": "int", + "default": "512" + } + ], + "DD_TRACE_YII_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_YII_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_YII_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_YII_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_YII_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_TRACE_ZENDFRAMEWORK_ANALYTICS_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false", + "aliases": [ + "DD_ZENDFRAMEWORK_ANALYTICS_ENABLED" + ] + } + ], + "DD_TRACE_ZENDFRAMEWORK_ANALYTICS_SAMPLE_RATE": [ + { + "implementation": "A", + "type": "decimal", + "default": "1.0", + "aliases": [ + "DD_ZENDFRAMEWORK_ANALYTICS_SAMPLE_RATE" + ] + } + ], + "DD_TRACE_ZENDFRAMEWORK_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_VERSION": [ + { + "implementation": "A", + "type": "string", + "default": "" + } + ], + "OTEL_LOG_LEVEL": [ + { + "implementation": "E", + "type": "string", + "default": "" + } + ], + "OTEL_METRICS_EXPORTER": [ + { + "implementation": "D", + "type": "string", + "default": "" + } + ], + "OTEL_PROPAGATORS": [ + { + "implementation": "B", + "type": "string", + "default": "" + } + ], + "OTEL_RESOURCE_ATTRIBUTES": [ + { + "implementation": "B", + "type": "string", + "default": "" + } + ], + "OTEL_SERVICE_NAME": [ + { + "implementation": "C", + "type": "string", + "default": "" + } + ], + "OTEL_TRACES_EXPORTER": [ + { + "implementation": "E", + "type": "string", + "default": "" + } + ], + "OTEL_TRACES_SAMPLER": [ + { + "implementation": "D", + "type": "string", + "default": "" + } + ], + "OTEL_TRACES_SAMPLER_ARG": [ + { + "implementation": "E", + "type": "string", + "default": "" + } + ] + }, + "deprecations": {} +} diff --git a/tests/ext/read_c_configuration.phpt b/tests/ext/read_c_configuration.phpt index 1104a95b5d..575a961b30 100644 --- a/tests/ext/read_c_configuration.phpt +++ b/tests/ext/read_c_configuration.phpt @@ -21,7 +21,7 @@ echo PHP_EOL; ?> --EXPECT-- some_known_host -0 +8126 FALSE FALSE 9999 diff --git a/tooling/generate-supported-configurations.sh b/tooling/generate-supported-configurations.sh new file mode 100755 index 0000000000..1f4e4381e6 --- /dev/null +++ b/tooling/generate-supported-configurations.sh @@ -0,0 +1,365 @@ +#!/bin/bash +# Generates metadata/supported-configurations.json from config definitions. +# +set -euo pipefail + +cd "$(dirname "$0")" + +# Maps C config type to JSON schema type. +PHP_CODE_FILE=$(mktemp "${TMPDIR:-/tmp}/ddtrace-supported-configurations.XXXXXX.php") +trap 'rm -f "$PHP_CODE_FILE"' EXIT + +cat >"$PHP_CODE_FILE" <<'ENDPHP' + 'boolean', 'STRING' => 'string', 'INT' => 'int', 'DOUBLE' => 'decimal', + 'MAP' => 'map', 'JSON' => 'array', 'SET_OR_MAP_LOWERCASE' => 'map', + 'SET' => 'array', 'SET_LOWERCASE' => 'array', + 'uint32_t' => 'int', 'uint64_t' => 'int', + ]; + return $map[$raw] ?? 'string'; +} + +function normalize_default($v, $type, $name) { + if (strtoupper($v) === 'NULL') { + // OTEL env vars are string-typed and use "" (not null) as their "unset" default. + if (strpos($name, 'OTEL_') === 0) { + return ''; + } + return null; + } + if ($type === 'boolean') { + if ($v === '0') return 'false'; + if ($v === '1') return 'true'; + } + // C-preprocessed string defaults keep one extra escaping layer. + // Normalize all string-typed defaults consistently. + if ($type === 'string') { + $v = stripslashes($v); + } + return $v; +} + +function normalize_aliases($aliases, $canonical) { + $out = []; + foreach ($aliases as $a) { + if ($a !== '' && $a !== $canonical) { + $out[$a] = true; + } + } + return array_keys($out); +} + +function normalize_supported_entries($entries, $canonical) { + if (!is_array($entries)) { + return []; + } + $normalized = []; + foreach ($entries as $entry) { + if (!is_array($entry)) { + continue; + } + if (isset($entry["aliases"]) && is_array($entry["aliases"])) { + $aliases = normalize_aliases($entry["aliases"], $canonical); + if (!empty($aliases)) { + sort($aliases); + $entry["aliases"] = $aliases; + } else { + unset($entry["aliases"]); + } + } + $normalized[] = $entry; + } + return $normalized; +} + +function add_supported_entry(&$supported, $name, $entry) { + // Keep the first-seen source as canonical for duplicate names. + if (!isset($supported[$name])) { + $supported[$name] = [$entry]; + } +} + +// temporary solution until we merge configs +function map_rust_type($rawType, $parser) { + $map = [ + 'ZAI_CONFIG_TYPE_BOOL' => 'boolean', + 'ZAI_CONFIG_TYPE_STRING' => 'string', + 'ZAI_CONFIG_TYPE_INT' => 'int', + 'ZAI_CONFIG_TYPE_DOUBLE' => 'decimal', + 'ZAI_CONFIG_TYPE_MAP' => 'map', + 'ZAI_CONFIG_TYPE_JSON' => 'array', + 'ZAI_CONFIG_TYPE_SET' => 'array', + 'ZAI_CONFIG_TYPE_SET_LOWERCASE' => 'array', + 'ZAI_CONFIG_TYPE_SET_OR_MAP_LOWERCASE' => 'map', + ]; + if (isset($map[$rawType])) { + return $map[$rawType]; + } + if ($rawType === 'ZAI_CONFIG_TYPE_CUSTOM') { + if ($parser === 'parse_profiling_enabled') { + return 'boolean'; + } + if ($parser === 'parse_sampling_distance_filter') { + return 'int'; + } + return 'string'; + } + return 'string'; +} + +function parse_rust_default($raw) { + $raw = trim(preg_replace('/\/\/.*$/', '', $raw)); + if ($raw === 'ZaiStr::new()') { + return ''; + } + if (preg_match('/ZaiStr::literal\(b"((?:\\\\.|[^"\\\\])*)\\\\0"\)/', $raw, $m)) { + return stripcslashes($m[1]); + } + return ''; +} + +function extract_rust_alias_groups($source) { + $groups = []; + if (preg_match_all('/const\s+([A-Z0-9_]+)\s*:\s*&\[ZaiStr\]\s*=\s*unsafe\s*\{\s*&\[(.*?)\]\s*\};/s', $source, $matches, PREG_SET_ORDER)) { + foreach ($matches as $match) { + $aliases = []; + if (preg_match_all('/ZaiStr::literal\(b"((?:\\\\.|[^"\\\\])*)\\\\0"\)/', $match[2], $aliasMatches)) { + foreach ($aliasMatches[1] as $alias) { + $aliases[] = stripcslashes($alias); + } + } + $groups[$match[1]] = $aliases; + } + } + return $groups; +} + +function extract_rust_env_var_names($source) { + $names = []; + if (preg_match_all('/([A-Za-z0-9_]+)\s*=>\s*b"([A-Z0-9_]+)\\\\0"/', $source, $matches, PREG_SET_ORDER)) { + foreach ($matches as $match) { + $names[$match[1]] = $match[2]; + } + } + return $names; +} + +function add_rust_profiling_configurations(&$supported, $path) { + if (!file_exists($path)) { + return; + } + $source = file_get_contents($path); + if ($source === false || $source === '') { + return; + } + + $envVarByConfigId = extract_rust_env_var_names($source); + if (empty($envVarByConfigId)) { + return; + } + $aliasesByConstName = extract_rust_alias_groups($source); + + if (!preg_match_all('/zai_config_entry\s*\{(.*?)\n\s*},/s', $source, $entryMatches, PREG_SET_ORDER)) { + return; + } + + foreach ($entryMatches as $entryMatch) { + $entryBlock = $entryMatch[1]; + if (!preg_match('/name:\s*([A-Za-z0-9_]+)\.env_var_name\(\),/', $entryBlock, $nameMatch)) { + continue; + } + $configId = $nameMatch[1]; + if (!isset($envVarByConfigId[$configId])) { + continue; + } + $name = $envVarByConfigId[$configId]; + + if (!preg_match('/type_:\s*(ZAI_CONFIG_TYPE_[A-Z_]+),/', $entryBlock, $typeMatch)) { + continue; + } + if (!preg_match('/default_encoded_value:\s*([^\n]+),/', $entryBlock, $defaultMatch)) { + continue; + } + + $parser = ''; + if (preg_match('/parser:\s*([^\n,]+),/', $entryBlock, $parserMatch)) { + $parserRaw = trim($parserMatch[1]); + if (preg_match('/Some\(([^)]+)\)/', $parserRaw, $parserNameMatch)) { + $parser = trim($parserNameMatch[1]); + } + } + + $aliases = []; + if (preg_match('/aliases:\s*([A-Z0-9_]+)\.as_ptr\(\),/', $entryBlock, $aliasesMatch)) { + $aliases = $aliasesByConstName[$aliasesMatch[1]] ?? []; + } + + $mappedType = map_rust_type(trim($typeMatch[1]), $parser); + $entry = [ + "implementation" => "A", + "type" => $mappedType, + "default" => normalize_default(parse_rust_default($defaultMatch[1]), $mappedType, $name), + ]; + $normAliases = normalize_aliases($aliases, $name); + if (!empty($normAliases)) { + sort($normAliases); + $entry["aliases"] = $normAliases; + } + add_supported_entry($supported, $name, $entry); + } +} + +$supported = []; +foreach (explode("|NEXT_CONFIG|", file_get_contents("php://stdin")) as $configLine) { + $config = str_getcsv(trim($configLine), ",", '"', '\\'); + if (count($config) < 3) { + continue; + } + [$type, $name, $default] = array_map('trim', array_slice($config, 0, 3)); + $aliases = count($config) > 3 ? array_slice($config, 3) : []; + $mappedType = map_type($type); + $entry = [ + "implementation" => "A", + "type" => $mappedType, + "default" => normalize_default($default, $mappedType, $name), + ]; + $norm = normalize_aliases($aliases, $name); + if (!empty($norm)) { + sort($norm); + $entry["aliases"] = $norm; + } + add_supported_entry($supported, $name, $entry); +} + +$otelPath = "../ext/otel_config.c"; +if (file_exists($otelPath)) { + preg_match_all('/ZAI_STRL\("(OTEL_[A-Z0-9_]+)"\)/', file_get_contents($otelPath), $m); + $otelVars = array_unique($m[1]); + sort($otelVars); + foreach ($otelVars as $v) { + add_supported_entry($supported, $v, ["implementation" => "A", "type" => "string", "default" => ""]); + } +} + +$profilingPath = "../profiling/src/config.rs"; +add_rust_profiling_configurations($supported, $profilingPath); + +if (empty($supported)) { + fwrite(STDERR, "Error: no supported configurations were generated\n"); + exit(1); +} +ksort($supported); + +$outputPath = "../metadata/supported-configurations.json"; +$output = [ + "version" => "2", + "supportedConfigurations" => $supported, + "deprecations" => (object)[], +]; +if (file_exists($outputPath)) { + $existing = json_decode(file_get_contents($outputPath), true); + if (is_array($existing)) { + $output["deprecations"] = isset($existing["deprecations"]) && is_array($existing["deprecations"]) + ? (object)$existing["deprecations"] : (object)[]; + $existingSupported = $existing["supportedConfigurations"] ?? []; + $merged = []; + foreach ($supported as $name => $entries) { + $generatedEntry = $entries[0]; + $existingEntries = normalize_supported_entries($existingSupported[$name] ?? [], $name); + $updated = false; + foreach ($existingEntries as $idx => $existingEntry) { + if (($existingEntry["implementation"] ?? null) === "A") { + $existingEntries[$idx] = $generatedEntry; + $updated = true; + break; + } + } + // If the existing JSON uses a different implementation label (e.g. "C", "E"), + // update the entry in-place but preserve that label instead of adding a new "A". + if (!$updated && !empty($existingEntries)) { + $impl = $existingEntries[0]["implementation"] ?? $generatedEntry["implementation"]; + $existingEntries[0] = $generatedEntry; + $existingEntries[0]["implementation"] = $impl; + $updated = true; + } + if (!$updated) { + $existingEntries[] = $generatedEntry; + } + $merged[$name] = $existingEntries; + } + ksort($merged); + $output["supportedConfigurations"] = $merged; + } +} else { + $output["supportedConfigurations"] = $supported; +} + +$dir = dirname($outputPath); +if (!is_dir($dir)) { + mkdir($dir, 0755, true); +} +$json = json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); +$json = preg_replace_callback('/^ +/m', function ($m) { + return str_repeat(' ', (int)(strlen($m[0]) / 4)); +}, $json); +file_put_contents($outputPath, $json . "\n"); +echo "Wrote supported configurations to $outputPath\n"; +ENDPHP + +cat <../ext/version.h +#ifndef PHP_DDTRACE_VERSION +#define PHP_DDTRACE_VERSION "$(cat "../VERSION")" +#endif +EOT + +PHP_VERSION_ID=${PHP_VERSION_ID:-0} + +extract_c_supported_configurations() { + local header="$1" + gcc $(php-config --includes) -I.. -I../ext -I../zend_abstract_interface -I../src/dogstatsd -I../components-rs -x c -E - <= 80300 +#define DD_SIDECAR_TRACE_SENDER_DEFAULT true +#else +#define DD_SIDECAR_TRACE_SENDER_DEFAULT false +#endif +// Do not expand CALIASES() directly, otherwise parameter counting in macros is broken. +#define ALTCALIASES(...) ,##__VA_ARGS__ +#define ALT +#define EXPAND(x) x +#define CUSTOM(id) id +// Preserve the literal config type tokens (e.g. CUSTOM(INT)) so the generator can +// map them to the correct JSON schema type. +#define CONFIG(type, name, default_value, ...) CALIAS(#type, name, default_value,) +#define SYSCFG(type, name, default_value, ...) CONFIG(type, name, default_value, __VA_ARGS__) +#define CALIAS(type, name, default_value, aliases, ...) type, #name, default_value EXPAND(ALT##aliases) |NEXT_CONFIG| + +JSON_CONFIGURATION_MARKER +DD_CONFIGURATION + +CODE +} + +{ + extract_c_supported_configurations "../ext/configuration.h" + extract_c_supported_configurations "../appsec/src/extension/configuration.h" +} | php "$PHP_CODE_FILE"