MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / resource_ids

Function resource_ids

tests/test_open_telemetry.py:6950–6953  ·  view source on GitHub ↗

The attributes of `span` that hold the ID of an API object.

(span: ReadableSpan)

Source from the content-addressed store, hash-verified

6948
6949
6950def resource_ids(span: ReadableSpan) -> dict[str, Any]:
6951 """The attributes of `span` that hold the ID of an API object."""
6952 common = ("anthropic.request.id", "anthropic.organization.id", "anthropic.workspace.id")
6953 return {key: value for key, value in attributes(span).items() if key.endswith(".id") and key not in common}
6954
6955
6956def assert_http_attributes(span: ReadableSpan, method: str, path: str) -> None:

Calls 1

attributesFunction · 0.70

Tested by

no test coverage detected