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

Method should_sample

tests/test_open_telemetry.py:200–203  ·  view source on GitHub ↗
(self, *args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

198
199 @override
200 def should_sample(self, *args: Any, **kwargs: Any) -> sampling.SamplingResult:
201 name, attributes = kwargs.get("name", args[2] if len(args) > 2 else None), kwargs.get("attributes")
202 self.started.append((str(name), dict(attributes or (args[4] if len(args) > 4 else None) or {})))
203 return sampling.ALWAYS_ON.should_sample(*args, **kwargs)
204
205 @override
206 def get_description(self) -> str:

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
appendMethod · 0.45
should_sampleMethod · 0.45

Tested by

no test coverage detected