{"record":{"id":"527f95ee3a107e24","repo":"prestodb/presto","slug":"plugin-configured-tracer-provider-s-does-not","errorCode":null,"errorMessage":"Plugin-configured tracer provider ('%s') does not match system-configured provider ('%s').","messagePattern":"Plugin-configured tracer provider \\('(.+?)'\\) does not match system-configured provider \\('(.+?)'\\)\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/tracing/TracerProviderManager.java","lineNumber":44,"sourceCode":"    private final boolean systemTracingEnabled;\n    @Nullable\n    private TracerProvider tracerProvider;\n\n    @Inject\n    public TracerProviderManager(TracingConfig config)\n    {\n        requireNonNull(config, \"config is null\");\n\n        this.tracerType = config.getTracerType();\n        boolean enableDistributedTracing = config.getEnableDistributedTracing();\n        TracingConfig.DistributedTracingMode distributedTracingMode = config.getDistributedTracingMode();\n        this.systemTracingEnabled = enableDistributedTracing && distributedTracingMode.name().equalsIgnoreCase(TracingConfig.DistributedTracingMode.ALWAYS_TRACE.name());\n    }\n\n    public void addTracerProviderFactory(TracerProvider provider)\n    {\n        if (!tracerType.equals(provider.getTracerType())) {\n            throw new IllegalArgumentException(\n                    format(\n                            \"Plugin-configured tracer provider ('%s') does not match system-configured provider ('%s').\",\n                            provider.getName(),\n                            tracerType));\n        }\n        if (systemTracingEnabled) {\n            if (tracerProvider != null) {\n                throw new IllegalArgumentException(format(\"Only a single plugin should set the tracer provider ('%s').\", tracerProvider.getTracerType()));\n            }\n            tracerProvider = provider;\n        }\n    }\n\n    public void loadTracerProvider()\n    {\n        if (tracerProvider != null) {\n            return;\n        }","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/tracing/TracerProviderManager.java#L26-L62","documentation":"TracerProviderManager.addTracerProviderFactory registers a plugin-supplied TracerProvider, but only if its tracer type matches the system-configured tracing type. A mismatch means the plugin's tracer cannot be used under the current tracing configuration, so it rejects the provider with IllegalArgumentException at plugin load time.","triggerScenarios":"Installing a plugin whose TracerProvider.getTracerType() differs from the value configured for the system tracer type (the tracerType field set from tracing configuration) while distributed tracing is enabled.","commonSituations":"Configuring tracing.properties for one tracer (e.g. the built-in provider) while a third-party plugin bundles a different tracer provider; upgrading a plugin that changed its default tracer type; copying a plugin from a cluster with different tracing settings.","solutions":["Align the system tracing type configuration with the plugin's getTracerType() value","Remove or disable the plugin that provides the incompatible tracer","Upgrade/downgrade the plugin to a version whose tracer type matches the cluster configuration","Check plugin logs or the provider's getTracerType()/getName() output to confirm the expected type"],"exampleFix":"// before (plugin provides OPENTELEMETRY but system expects DATADOG)\ntracing.distributed-tracing-enabled=true\ntracer-type=DATADOG\n// after (match plugin provider type)\ntracing.distributed-tracing-enabled=true\ntracer-type=OPENTELEMETRY","handlingStrategy":"validation","validationCode":"if (!configuredTracerType.equals(pluginProvider.getTracerType())) {\n    throw new IllegalStateException(String.format(\n        \"Plugin tracer '%s' type %s does not match configured tracer type %s\",\n        pluginProvider.getName(), pluginProvider.getTracerType(), configuredTracerType));\n}","typeGuard":"boolean isCompatibleTracerProvider(TracerProvider provider, String configuredTracerType) {\n    return provider != null && configuredTracerType.equals(provider.getTracerType());\n}","tryCatchPattern":"try {\n    tracerProviderManager.addTracerProviderFactory(provider);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"does not match system-configured provider\")) {\n        LOG.error(\"Plugin '%s' tracer type incompatible with cluster config; uninstall or fix config\", provider.getName());\n    } else {\n        throw e;\n    }\n}","preventionTips":["Check the plugin's getTracerType() against tracing.properties before deploying","Keep tracing type configuration and installed tracer plugins in lockstep across the cluster","Review plugin release notes for tracer-type changes when upgrading","Use a single source of truth for tracer configuration per environment"],"tags":["tracing","configuration","plugin","mismatch"],"backgroundTag":"plugin-config-mismatch","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"}