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

Function resource_ids

tests/test_open_telemetry.py:6952–6955  ·  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

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

Calls 2

attributesFunction · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected