Skip to content

Chat span emitted even when MAF instrumentation is disabled #100

Closed

Description

Summary

When using microsoft-opentelemetry distro with MAF (Microsoft Agent Framework) instrumentation disabled, a chat gpt-4.1 span is still being emitted. This span should not appear when MAF instrumentation is turned off.

Repro Steps

  1. Use microsoft-opentelemetry distro
  2. Disable MAF instrumentation
  3. Invoke an agent
  4. Observe that a chat span still shows up under the invoke_agent trace

Expected Behavior

No chat span should appear when MAF instrumentation is disabled.

Actual Behavior

A chat gpt-4.1 span (7.2s, 69 tokens) is emitted with full gen_ai attributes (input/output messages, token usage, cost, agent name/id). The span includes attributes like:

  • gen_ai.agent.name
  • gen_ai.agent.id
  • microsoft.gen_ai.cost.input
  • microsoft.gen_ai.cost.output
  • gen_ai.usage.input_tokens
  • gen_ai.usage.output_tokens
  • gen_ai.response.model: gpt-4.1

Screenshot

Image

(See attached image showing the chat span with metadata appearing under invoke_agent trace even with MAF instrumentation disabled)

Environment

  • Distro: microsoft-opentelemetry (Python)
  • Agent Framework: MAF (Microsoft Agent Framework)
  • Model: gpt-4.1

Related

Activity

  1. rads-1996 commented on Apr 30, 2026

    @rads-1996
    Member

    Ankit Singhal (@singankit) Can you share your application code? Can you also share your distro setup?

  2. rads-1996 commented on May 4, 2026

    @rads-1996
    Member

    Ankit Singhal (@singankit) Reminder: Can you share your application code? Can you also share your distro setup?

  3. github-actions commented on May 29, 2026

    @github-actions

    Ankit Singhal (@singankit) we need more information before we can continue working on this issue.

    Please reply within 14 days. If we do not hear back, this issue may be closed automatically.

    Marked as needs-author-feedback on 2026-05-29.

  4. github-actions commented on Jun 6, 2026

    @github-actions

    Ankit Singhal (@singankit) friendly reminder: we are still waiting for your feedback.

    If we do not hear back within 7 more days, this issue may be closed automatically.

  5. github-actions commented on Jun 13, 2026

    @github-actions

    Ankit Singhal (@singankit) we have not received the requested information within 14 days, so we are closing this issue for now.

    If you still need help, please comment with the requested details and we can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions