Skip to content

[FEATURE] [Observability] Allow customer to pass tracer/meter providers to Strands #205

Closed
@poshinchen

Description

@poshinchen
Contributor

Problem Statement

Customer might have their own tracerProvider already in their app, and the tracing setup will get overridden when using Strands.

Proposed Solution

Allow customer to pass tracer provider to Strands to reuse the tracing setup.

Use Case

Pass tracer provider to Strands Agent to reuse the tracing setup.

Alternatives Solutions

No response

Additional Context

No response

Activity

self-assigned this
on Jun 11, 2025
MaDDoGo

MaDDoGo commented on Jun 19, 2025

@MaDDoGo

As a workaround:

tracer = Tracer(service_name="custom_name")
tracer.tracer_provider = trace.get_tracer_provider() # for global defined providers or provide your provider.

It outputs a warning (because you can't override the no-op provider twice, but it works until the official solution is there

poshinchen

poshinchen commented on Jun 19, 2025

@poshinchen
ContributorAuthor

#207 has been merged, closing the issue.

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @MaDDoGo@poshinchen

      Issue actions

        [FEATURE] [Observability] Allow customer to pass tracer/meter providers to Strands · Issue #205 · strands-agents/sdk-python