Skip to content

Module "opentelemetry.trace" has no attribute "get_current_span" #235

@yashkhare0

Description

@yashkhare0

app_test\log.py:6: error: Module "opentelemetry.trace" has no attribute
"get_current_span" [attr-defined]
from opentelemetry.trace import get_current_span
^
app_test\web\lifespan.py:5: error: Module
"opentelemetry.exporter.otlp.proto.grpc.trace_exporter" has no attribute
"OTLPSpanExporter" [attr-defined]
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLP...
^
app_test\web\lifespan.py:6: error: Module
"opentelemetry.instrumentation.aio_pika" has no attribute "AioPikaInstrumentor"
[attr-defined]
from opentelemetry.instrumentation.aio_pika import AioPikaInstrumentor
^
app_test\web\lifespan.py:7: error: Module
"opentelemetry.instrumentation.fastapi" has no attribute "FastAPIInstrumentor"
[attr-defined]
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
^
app_test\web\lifespan.py:8: error: Module
"opentelemetry.instrumentation.redis" has no attribute "RedisInstrumentor"
[attr-defined]
from opentelemetry.instrumentation.redis import RedisInstrumentor
^
app_test\web\lifespan.py:9: error: Module
"opentelemetry.instrumentation.sqlalchemy" has no attribute
"SQLAlchemyInstrumentor" [attr-defined]
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrum...
^
app_test\web\lifespan.py:10: error: Module "opentelemetry.sdk.resources"
has no attribute "Resource" [attr-defined]
from opentelemetry.sdk.resources import Resource
^
app_test\web\lifespan.py:11: error: Module "opentelemetry.sdk.trace" has
no attribute "TracerProvider" [attr-defined]
from opentelemetry.sdk.trace import TracerProvider
^
app_test\web\lifespan.py:12: error: Module
"opentelemetry.sdk.trace.export" has no attribute "BatchSpanProcessor"
[attr-defined]
from opentelemetry.sdk.trace.export import BatchSpanProcessor
^
app_test\web\lifespan.py:13: error: Module
"opentelemetry.semconv.resource" has no attribute "ResourceAttributes"
[attr-defined]
from opentelemetry.semconv.resource import ResourceAttributes
^
app_test\web\lifespan.py:14: error: Module "opentelemetry.trace" has no
attribute "set_tracer_provider" [attr-defined]
from opentelemetry.trace import set_tracer_provider
^
Found 11 errors in 2 files (checked 59 source files)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions