Skip to content

[Feat]: Add a switch to enable or disable OpenTelemetry reporting #295

Closed

Description

@Brant-lzh

Is your feature request related to a problem? Please describe.

Currently, OpenTelemetry reporting is always enabled in the code. In some cases, we want to disable it for local development or troubleshooting.

Describe the solution you'd like

Add a configuration option (e.g., environment variable or function parameter) to control whether OpenTelemetry tracing is enabled.

Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. rajeshvelicheti commented on Jul 11, 2025

    @rajeshvelicheti
    Contributor

    Thanks for reporting thie @Brant-lzh A quick question though, though telemetry is enabled, all of it is no-op if you do not register and configure your tracer. Curious to understand more about your use-case.

  2. kakao-bart-lee commented on Jul 16, 2025

    @kakao-bart-lee

    I have a similar situation. I use Google's A2A and ADK in conjunction and collect telemetry information with langfuse.

    However, I want to disable A2A because the information collected from A2A is too much and noisy. If I disable OTEL collection itself, there is a problem that ADK information is not collected either.

  3. andrewn3 commented on Jul 19, 2025

    @andrewn3

    I also have a similar situation. I'm only interested in the actual internal agent traces and not the noisy a2a traces which you can't turn off which can can see from the screenshot.

    with crewai you can set-up the otel logging with the following command

    from langfuse import get_client
    langfuse = get_client()
    if langfuse.auth_check():
    print("Langfuse client is authenticated and ready!")
    else:
    print("Authentication failed. Please check your credentials and host.")
    import openlit
    openlit.init()

    I can't get a working solution to exclude the a2a-python-sdk scope from the span, and the a2a sdk doesn't have the ability to surpress or turn it it just for your library.

    Image
  4. Brant-lzh commented on Jul 21, 2025

    @Brant-lzh
    Author

    @rajeshvelicheti thx

    I'm using a2a with LangGraph, and my use case requires me to report telemetry only for LangGraph data, not for a2a data.

  5. andrewn3 commented on Jul 22, 2025

    @andrewn3

    I did manage to create a custom collector and then exclude the noisy a2a traces with this matching scope if this helps.

    Comprehensive filter to exclude a2a spans

    filter/exclude-a2a:
    error_mode: ignore
    traces:
    span:
    - 'IsMatch(name, "a2a")'
    - 'IsMatch(attributes["service.name"], "a2a")'
    - 'instrumentation_scope.name == "a2a-python-sdk"'

  6. realkarych commented on Aug 5, 2025

    @realkarych

    Hey! I can implement this. Who can decide whether we’ll take this feature into development or not? @holtskinner

  7. bubuTT commented on Sep 2, 2025

    @bubuTT

    @rajeshvelicheti thx

    I'm using a2a with LangGraph, and my use case requires me to report telemetry only for LangGraph data, not for a2a data.

    I also using a2a-python with LangGraph,
    in my case, I resolve that issue using filtering-by-instrumentation-scope

    from langfuse import Langfuse
    
    langfuse = Langfuse(
        blocked_instrumentation_scopes=["a2a-python-sdk"]
    )

    Langfuse tracing client is implemented as a singleton internally.
    Important point, Ensure the code above run before calling get_client() or CallbackHandler.

  8. holtskinner commented on Sep 30, 2025

    @holtskinner
    Member

    As of 0.3.0, telemetry is only installed with a package extra uv add "a2a-sdk[telemetry]". Does this resolve the issue?

  9. niallthomson commented on Nov 19, 2025

    @niallthomson

    This may be a different issue but: I've been finding the amount of spans generated by this package to be a bit over the top. Having a way to disable this package specifically, or reduce the amount of spans created, would be nice.

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions