Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Using otelcollector for tracing in config throws error #4603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ManjunathVaddapally opened this issue May 28, 2025 · 0 comments
Closed

Using otelcollector for tracing in config throws error #4603

ManjunathVaddapally opened this issue May 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ManjunathVaddapally
Copy link

Describe your environment

OS: Windows server 2019
Python version: Python 3.12.8
opentelemetry-sdk version: 1.33.0
aiq version: 1.1.0rc5

What happened?

I have a tool that uses opentelemetry to collect telemetry data similar to phoenix and display it on UI.
I want to integrate the tool with Agentic IQ.
I have enabled tracing in config file mentioning "otelcollector" as name and _type.
Getting Error: " module 'opentelemetry.sdk.trace.export' has no attribute 'OTLPSpanExporter' ".

AIQ Toolkit internally uses following code when otelcollector is used instead of phoenix.

async def otel_telemetry_exporter(config: OtelCollectorTelemetryExporter, builder: Builder):
    """Create an OpenTelemetry telemetry exporter."""
    # If the dependencies are not installed, a TelemetryOptionalImportError will be raised
    opentelemetry = try_import_opentelemetry()
    yield opentelemetry.sdk.trace.export.OTLPSpanExporter(config.endpoint) 

opentelemetry library doesn't contain any class named OTLPSpanExporter in opentelemetry.sdk.trace.export

Steps to Reproduce

In the config file of any example, enable tracing by adding following code.

  general:
  use_uvloop: true
  telemetry:
    logging:
      console:
        _type: console
        level: WARN
      file:
        _type: file
        path: ./tmp/aiq_multi_framework.log
        level: DEBUG
    tracing:
      otelcollector:
        _type: otelcollector
        endpoint: http://127.*.*.1/v1/traces
        project: multi_frameworks`

We use "otelcollector" in tracing when we want the AIQ tool to send the data to any observability tool other than Phoenix.
Run the example with any input.

Expected Result

Run the example and Send respective telemetry data to the end point mentioned.

Actual Result

AttributeError: module 'opentelemetry.sdk.trace.export' has no attribute 'OTLPSpanExporter'. Did you mean: 'SpanExporter
you mean: 'SpanExporter'?
Error: module 'opentelemetry.sdk.trace.export' has no attribute 'OTLPSpanExporter'

Additional context

No response

Would you like to implement a fix?

None

@ManjunathVaddapally ManjunathVaddapally added the bug Something isn't working label May 28, 2025
@ManjunathVaddapally ManjunathVaddapally changed the title Tracing otelcollector Issue Using otelcollector for tracing in config throws error May 28, 2025
@ManjunathVaddapally ManjunathVaddapally closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant