Skip to content

[NET-1248] feat: Add support for capturing spans from anthropic tool runner#96

Merged
akash-vijay-kv merged 17 commits into
devfrom
feat/anthropic-tool-runner
Jul 2, 2026
Merged

[NET-1248] feat: Add support for capturing spans from anthropic tool runner#96
akash-vijay-kv merged 17 commits into
devfrom
feat/anthropic-tool-runner

Conversation

@Nithish-KV

@Nithish-KV Nithish-KV commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Add support to automatically capture llm and tool spans from anthropic tool runner.
  • Update netra decorators to fix context management for async generator functions.

Jira

NET-1248

Comment thread src/decorators.ts Outdated
Comment thread src/instrumentation/anthropic/wrappers.ts Outdated
Comment thread src/instrumentation/anthropic/wrappers.ts Outdated
Comment thread src/instrumentation/anthropic/wrappers.ts Outdated
Comment thread src/decorators.ts Outdated
Comment thread src/instrumentation/anthropic/wrappers.ts Outdated
Comment thread src/decorators.ts Outdated
Comment thread src/instrumentation/anthropic/utils.ts Outdated
setResponseAttributes as setBaseResponseAttributes,
} from "../utils";

function toolSafeStringify(value: unknown): string {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON.stringify(undefined), functions, and symbols can return undefined, so this can violate the return type and set invalid span attribute values.

Comment thread src/instrumentation/anthropic/index.ts Outdated
Comment thread src/instrumentation/anthropic/index.ts Outdated
@Nithish-KV Nithish-KV force-pushed the feat/anthropic-tool-runner branch from d18b951 to 50ac341 Compare July 2, 2026 06:36
@akash-vijay-kv akash-vijay-kv merged commit ab18477 into dev Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants