{"record":{"id":"988fbfc40bbf3d3e","repo":"prestodb/presto","slug":"distributed-tracing-error-988fbf","errorCode":"DISTRIBUTED_TRACING_ERROR","errorMessage":"SAMPLE_BASED Tracing Mode is currently not supported.","messagePattern":"SAMPLE_BASED Tracing Mode is currently not supported\\.","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/tracing/TracingConfig.java","lineNumber":74,"sourceCode":"    }\n\n    @Config(\"tracing.enable-distributed-tracing\")\n    public TracingConfig setEnableDistributedTracing(boolean enableDistributedTracing)\n    {\n        this.enableDistributedTracing = enableDistributedTracing;\n        return this;\n    }\n\n    public DistributedTracingMode getDistributedTracingMode()\n    {\n        return tracingMode;\n    }\n\n    @Config(\"tracing.distributed-tracing-mode\")\n    public TracingConfig setDistributedTracingMode(String tracingMode)\n    {\n        if (tracingMode.equalsIgnoreCase(DistributedTracingMode.SAMPLE_BASED.name())) {\n            throw new PrestoException(\n                    DISTRIBUTED_TRACING_ERROR,\n                    \"SAMPLE_BASED Tracing Mode is currently not supported.\");\n        }\n        this.tracingMode = DistributedTracingMode.valueOf(tracingMode.toUpperCase());\n        return this;\n    }\n}\n","sourceCodeStart":56,"sourceCodeEnd":82,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/tracing/TracingConfig.java#L56-L82","documentation":"TracingConfig.setDistributedTracingMode is the @Config binding for tracing.distributed-tracing-mode. The SAMPLE_BASED mode is not implemented, so selecting it is rejected immediately at configuration load with DISTRIBUTED_TRACING_ERROR rather than failing later at runtime.","triggerScenarios":"Setting tracing.distributed-tracing-mode=SAMPLE_BASED (any casing) in tracing.properties or via equivalent config during server startup.","commonSituations":"Following documentation or examples written for a newer Presto version that supports SAMPLE_BASED; guessing a mode name from the DistributedTracingMode enum; copy-pasting config from another cluster with a different Presto build.","solutions":["Change tracing.distributed-tracing-mode to ALWAYS_TRACE (the supported mode)","Remove the tracing.distributed-tracing-mode property to use the default mode","Upgrade Presto to a version that implements SAMPLE_BASED if sample-based tracing is required","Leave distributed tracing disabled if sampling semantics are essential and unsupported"],"exampleFix":"// before\ntracing.distributed-tracing-mode=SAMPLE_BASED\n// after\ntracing.distributed-tracing-mode=ALWAYS_TRACE","handlingStrategy":"validation","validationCode":"String mode = props.getProperty(\"tracing.distributed-tracing-mode\");\nif (mode != null && mode.equalsIgnoreCase(\"SAMPLE_BASED\")) {\n    throw new IllegalArgumentException(\"tracing.distributed-tracing-mode=SAMPLE_BASED is unsupported; use ALWAYS_TRACE\");\n}","typeGuard":"boolean isSupportedTracingMode(String mode) {\n    return mode != null && !mode.equalsIgnoreCase(\"SAMPLE_BASED\");\n}","tryCatchPattern":"try {\n    config.setDistributedTracingMode(tracingMode);\n} catch (PrestoException e) {\n    if (e.getMessage().contains(\"SAMPLE_BASED\")) {\n        LOG.warn(\"SAMPLE_BASED unsupported; falling back to ALWAYS_TRACE\");\n        config.setDistributedTracingMode(\"ALWAYS_TRACE\");\n    } else {\n        throw e;\n    }\n}","preventionTips":["Validate tracing.properties against supported values for your Presto version before deploy","Use ALWAYS_TRACE (or omit the property) until SAMPLE_BASED ships in your build","Smoke-test server startup with new tracing config in a staging cluster","Derive mode values from the DistributedTracingMode enum minus unsupported entries"],"tags":["tracing","configuration","unsupported-feature"],"backgroundTag":"unsupported-config-value","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}