Skip to content

GenAI instrumentation not capturing content message #4038

@julianocosta89

Description

@julianocosta89

Describe your environment

OS: MacOS Tahoe 26.1
Python version: Python 3.12
Package version: 0.60b1

What happened?

We recently added an LLM mock service in the OTel Demo.
The product-reviews service, it generates spans following the sem conv.
Initially I was seeing some spans with old sem conv, but when I set OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental it worked fine.

The issue is that message content is not part of the spans, even though we have set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT= span_and_event set.

Checking the specs, looks like we are following the right pattern.
Are we missing anything?

Steps to Reproduce

git clone git@github.com:open-telemetry/opentelemetry-demo.git cd opentelemetry-demo 

Modify the docker-compose.yml file to comment old format and add the new format:

 #- OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true - OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=span_and_event - OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental 

start the demo

make start 

Navigate to http://localhost:8080/jaeger/ui/ and check the spans for service product-reviews. (it may take a minute)

Expected Result

I expect seeing spans events with message content

Actual Result

No span contains any content message events.

Additional context

If you want to keep the demo running and just test changes on code or env vars of product-reviews, you can change the code and run:

make redeploy service=product-reviews 

Would you like to implement a fix?

No

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions