Skip to content

Bug Report: Get duplicated LLM spans in AgentScope applications #151

@Cirilla-zmh

Description

@Cirilla-zmh

Describe your environment

OS: MacOS
Python version: 3.12
Package version: 0.3.0.dev

What happened?

We always get 4 LLM span for one react iteration. Just see:

Image

Steps to Reproduce

  1. Download source code of copaw: https://github.com/agentscope-ai/CoPaw
  2. Instrument copaw with loongsuite-python-agent, just do:
    a. clone loongsuite-python-agent
    b. install instrumentation packages: pip install loongsuite-python-agent/loongsuite-distro & pip install loongsuite-python-agent/util/opentelemetry-util-genai & pip install loongsuite-python-agent/instrumentation-loongsuite/loongsuite-instrumentation-agentscope
    c. do from opentelemetry.instrumentation.auto_instrumentation import sitecustomize before copaw is initialize
  3. Start CoPaw following README: https://github.com/agentscope-ai/CoPaw?tab=readme-ov-file#quick-start
  4. Ask CoPaw to complete a simple task with a tool, like "what's on my desktop".

Expected Result

Only one LLM span should be record for each react iteration.

Actual Result

You will gain a trace with duplicated LLM spans.

Additional context

No response

Would you like to implement a fix?

None

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

Labels

bugSomething isn't workinggenaiThe genai label represents issues related to generative AI.instrumentaionThe instrumentation label represents issues related to instrumentation.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions