{"record":{"id":"5d77a3d016902c59","repo":"jaegertracing/jaeger","slug":"extension-q-does-not-implement-queryinterceptor-i","errorCode":null,"errorMessage":"extension %q does not implement queryinterceptor.Interceptor","messagePattern":"extension %q does not implement queryinterceptor\\.Interceptor","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/queryinterceptor/resolver.go","lineNumber":47,"sourceCode":"// component references an extension by component.ID in its config and resolves\n// it from host.GetExtensions() at start time.\nfunc Resolve(host component.Host, ids []component.ID) ([]pub.Interceptor, error) {\n\tif len(ids) == 0 {\n\t\treturn nil, nil\n\t}\n\textensions := host.GetExtensions()\n\tinterceptors := make([]pub.Interceptor, 0, len(ids))\n\tfor _, id := range ids {\n\t\tcomp, ok := extensions[id]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"cannot find query interceptor extension %q (make sure it is defined under extensions: and enabled in service.extensions)\",\n\t\t\t\tid,\n\t\t\t)\n\t\t}\n\t\tinterceptor, ok := comp.(pub.Interceptor)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"extension %q does not implement queryinterceptor.Interceptor\", id)\n\t\t}\n\t\tinterceptors = append(interceptors, interceptor)\n\t}\n\treturn interceptors, nil\n}\n","sourceCodeStart":29,"sourceCodeEnd":53,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/queryinterceptor/resolver.go#L29-L53","documentation":"The requested extension ID was found in the host, but its component does not implement the queryinterceptor.Interceptor interface (type assertion comp.(pub.Interceptor) fails). Only extensions purpose-built as Jaeger query interceptors can be listed in the jaeger_query interceptor config; arbitrary extensions (e.g. health_check, pprof) cannot.","triggerScenarios":"queryinterceptor.Resolve with an ID that maps to an existing extension whose type lacks the Interceptor interface methods — e.g. listing `health_check` or a storage extension in jaeger_query's interceptor list.","commonSituations":"Misunderstanding which extensions qualify as query interceptors; wiring a generic collector extension where a Jaeger-specific interceptor is required; version mismatch where a custom interceptor extension was replaced by an incompatible one.","solutions":["Replace the configured ID with one that actually implements queryinterceptor.Interceptor.","Remove the entry from jaeger_query's interceptor list if you don't need interception.","If you wrote a custom extension, add the Interceptor interface methods (e.g. the interceptor hook signatures) to its component.","Check the extension's documentation/version to confirm it is a query interceptor."],"exampleFix":"// before\nservice:\n  extensions: [health_check, jaeger_query]\njaeger_query:\n  interceptors: [health_check]\n// after\njaeger_query:\n  interceptors: [my_custom_query_interceptor]","handlingStrategy":"type-guard","validationCode":"// before listing an extension as interceptor, confirm it advertises Interceptor support in its docs/README","typeGuard":"func asQueryInterceptor(c component.Component) (pub.Interceptor, bool) {\n    it, ok := c.(pub.Interceptor)\n    return it, ok\n}","tryCatchPattern":"interceptors, err := resolver.Resolve(host, ids)\nif err != nil && strings.Contains(err.Error(), \"does not implement\") {\n    log.Fatalf(\"config error: %v\", err) // fix config, not runtime\n}","preventionTips":["Only configure extensions documented as query interceptors.","Add a startup assertion test asserting your extension implements pub.Interceptor.","Pin extension versions compatible with your jaeger-query version."],"tags":["config","type-assertion","otel-collector","interface"],"backgroundTag":"interface-not-implemented","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}