diff --git a/.github/workflows/supported_configurations_sync.yml b/.github/workflows/supported_configurations_sync.yml new file mode 100644 index 0000000000..50eb481800 --- /dev/null +++ b/.github/workflows/supported_configurations_sync.yml @@ -0,0 +1,28 @@ +name: Validate supported configurations + +on: + push: + +jobs: + validate-supported-configurations: + name: validate supported configurations + runs-on: ubuntu-24.04 + permissions: + contents: read + + steps: + - name: Checkout + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + clean: true + + - name: Verify supported configurations are in sync + run: | + 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 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/one-pipeline.locked.yml b/.gitlab/one-pipeline.locked.yml index bae6030153..3e1f1a6259 100644 --- a/.gitlab/one-pipeline.locked.yml +++ b/.gitlab/one-pipeline.locked.yml @@ -1,4 +1,4 @@ # DO NOT EDIT THIS FILE MANUALLY # This file is auto-generated by automation. include: - - remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/c6ea92df19738f28d6e7c3e4fea86d030fa801ac3361427d6acb6f99a917c28a/one-pipeline.yml + - remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/f14ac28614630d12bcfe6cba4fd8d72dce142c62ff0b053ba7c323622104ebd7/one-pipeline.yml diff --git a/appsec/src/extension/configuration.h b/appsec/src/extension/configuration.h index 0794b8761d..882e371d5a 100644 --- a/appsec/src/extension/configuration.h +++ b/appsec/src/extension/configuration.h @@ -58,7 +58,7 @@ extern bool runtime_config_first_init; CONFIG(STRING, DD_VERSION, "") \ CONFIG(BOOL, DD_REMOTE_CONFIG_ENABLED, "true") \ CONFIG(CUSTOM(uint32_t), DD_REMOTE_CONFIG_POLL_INTERVAL, "1000", .parser = _parse_uint32) \ - CONFIG(STRING, DD_AGENT_HOST, "") \ + CONFIG(STRING, DD_AGENT_HOST, "localhost") \ CONFIG(INT, DD_TRACE_AGENT_PORT, "0") \ CONFIG(INT, DD_APPSEC_MAX_BODY_BUFF_SIZE, "524288") \ CONFIG(STRING, DD_TRACE_AGENT_URL, "") \ diff --git a/ext/configuration.h b/ext/configuration.h index 8984674f68..0607cacab2 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") \ @@ -117,7 +117,7 @@ enum ddtrace_sampling_rules_format { 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) \ + 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 */ \ @@ -163,7 +163,7 @@ enum ddtrace_sampling_rules_format { CONFIG(INT, DD_TRACE_RATE_LIMIT, "100", .ini_change = zai_config_system_ini_change) \ CONFIG(DOUBLE, DD_TRACE_SAMPLE_RATE, "-1", .ini_change = ddtrace_alter_DD_TRACE_SAMPLE_RATE, \ .env_config_fallback = ddtrace_conf_otel_sample_rate) \ - CONFIG(JSON, DD_TRACE_SAMPLING_RULES, "[]") \ + CONFIG(JSON, DD_TRACE_SAMPLING_RULES, "[]") \ CONFIG(CUSTOM(INT), DD_TRACE_SAMPLING_RULES_FORMAT, "glob", .parser = dd_parse_sampling_rules_format) \ CONFIG(JSON, DD_SPAN_SAMPLING_RULES, "[]") \ CONFIG(STRING, DD_SPAN_SAMPLING_RULES_FILE, "", .ini_change = ddtrace_alter_sampling_rules_file_config) \ @@ -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), \ @@ -248,7 +248,7 @@ 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(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) \ @@ -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/metadata/supported-configurations.json b/metadata/supported-configurations.json new file mode 100644 index 0000000000..c85e4f23e4 --- /dev/null +++ b/metadata/supported-configurations.json @@ -0,0 +1,2297 @@ +{ + "version": "2", + "supportedConfigurations": { + "DD_AGENT_HOST": [ + { + "implementation": "A", + "type": "string", + "default": "localhost" + } + ], + "DD_API_KEY": [ + { + "implementation": "C", + "type": "string", + "default": "" + } + ], + "DD_APM_TRACING_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "false" + } + ], + "DD_APPSEC_RASP_ENABLED": [ + { + "implementation": "A", + "type": "boolean", + "default": "true" + } + ], + "DD_APPSEC_SCA_ENABLED": [ + { + "implementation": "C", + "type": "boolean", + "default": "false" + } + ], + "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_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_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/tooling/generate-supported-configurations.sh b/tooling/generate-supported-configurations.sh new file mode 100644 index 0000000000..f107ca50f1 --- /dev/null +++ b/tooling/generate-supported-configurations.sh @@ -0,0 +1,219 @@ +#!/bin/bash +# Generates metadata/supported-configurations.json from ext/configuration.h +# +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', + 'CUSTOM(INT)' => 'string', 'CUSTOM(MAP)' => 'map', + ]; + return $map[$raw] ?? 'string'; +} + +function normalize_default($v, $type, $name) { + $v = preg_replace('/\s*ALT\s*$/', '', trim($v)); + if ($v === '"' || $v === '') { + return ''; + } + 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'; + } + if ($name === 'DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP') { + $v = stripslashes($v); + } + return $v; +} + +function normalize_aliases($aliases, $canonical) { + $out = []; + foreach ($aliases as $a) { + $a = trim(preg_replace('/\s*ALT\s*$/', '', $a)); + if ($a !== '' && $a !== $canonical && $a !== 'ALT') { + $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; +} + +$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; + } + $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) { + if (!isset($supported[$v])) { + $supported[$v] = [["implementation" => "A", "type" => "string", "default" => ""]]; + } + } +} + +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} +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 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 CALIAS(type, name, default_value, aliases, ...) type, #name, default_value EXPAND(ALT##aliases) |NEXT_CONFIG| + +JSON_CONFIGURATION_MARKER +DD_CONFIGURATION + +CODE