dd-trace-py API reference
400 public APIs from dd-trace-py (DataDog/dd-trace-py) — 122 classes, 179 functions, 99 methods. Signatures extracted by static analysis of the actual source.
Repository: DataDog/dd-trace-py
| Kind | Count |
|---|---|
| Classes | 122 |
| Functions | 179 |
| Methods | 99 |
API list
func
.gitlab.validate-ddtrace-package.identify_version_mismatches(actual_set:set[tuple[str, str, str, str]], package_version:str) -> dict[str, tuple[str, str]]Identify wheels with wrong versions.
func
.gitlab.validate-ddtrace-package.parse_actual_wheels(wheels_dir:str) -> tuple[set[tuple[str, str, str, str]], list[str], int]Parse actual wheel files.
func
.gitlab.validate-ddtrace-package.reconstruct_wheel_filename(version:str, python_tag:str, platform:str, flavor:str) -> strReconstruct wheel filename from components.
func
.gitlab.validate-ddtrace-package.validate_sdist(wheels_dir:str, package_version:str) -> tuple[bool, str, str | None]Validate sdist exists and has correct version.
func
ddtrace._logger.configure_ddtrace_logger() -> NoneConfigures ddtrace log levels and file paths.
class
ddtrace._monkey.PatchExceptionWraps regular `Exception` class when patching modules
func
ddtrace._monkey.patch(raise_errors:bool=True, **patch_modules:Union[list[str], bool]) -> NonePatch only a set of given modules.
func
ddtrace._monkey.patch_all(**patch_modules:bool) -> NoneEnables ddtrace library instrumentation.
class
ddtrace._trace._span_link.SpanLinkKindA collection of standard SpanLink kinds.
method
ddtrace._trace.context.Context.copy(trace_id:int, span_id:int) -> 'Context'Return a shallow copy of the context with the given correlation IDs.
method
ddtrace._trace.context.Context.dd_origin() -> Optional[Text]Get the origin of the trace.
method
ddtrace._trace.context.Context.dd_user_id() -> Optional[Text]Get the user ID of the trace.
method
ddtrace._trace.context.Context.get_all_baggage_items() -> dict[str, Any]Returns all baggage items in this span context.
method
ddtrace._trace.context.Context.get_baggage_item(key:str) -> Optional[Any]Gets a baggage item in this span context.
method
ddtrace._trace.context.Context.remove_all_baggage_items() -> NoneRemoves all baggage items from this span context.
method
ddtrace._trace.context.Context.remove_baggage_item(key:str) -> NoneRemove a baggage item from this span context.
method
ddtrace._trace.context.Context.set_baggage_item(key:str, value:Any) -> NoneSets a baggage item in this span context.
class
ddtrace._trace.events.TracingEventTracingEvent is a specialization of Event.
class
ddtrace._trace.processor.TraceSamplingProcessorProcessor that runs both trace and span sampling rules.
class
ddtrace._trace.processor.TraceTagsProcessorProcessor that applies trace-level tags to the trace.
method
ddtrace._trace.span.Span.context() -> ContextThe trace context for this span.
method
ddtrace._trace.span.Span.finish(finish_time:Optional[float]=None) -> NoneMark the end time of the span and submit it to the tracer.
method
ddtrace._trace.span.Span.get_metrics() -> dict[str, NumericType]Return all metrics.
method
ddtrace._trace.span.Span.get_tags() -> dict[str, str]Return all string tags.
method
ddtrace._trace.span.Span.link_span(context:Context, attributes:Optional[Mapping[str, Any]]=None) -> NoneDefines a causal relationship between two spans
method
ddtrace._trace.span.Span.record_exception(exception:BaseException, attributes:Optional[dict[str, _AttributeValueType]]=None) -> NoneRecords an exception as a span event.
method
ddtrace._trace.span.Span.remove_metric(key:str) -> NoneRemove a metric from the span.
method
ddtrace._trace.span.Span.remove_tag(key:str) -> NoneRemove a tag from the span.
method
ddtrace._trace.span.Span.set_metric(key:str, value:NumericType) -> NoneThis method sets a numeric tag value for the given key.
method
ddtrace._trace.span.Span.set_metrics(metrics:dict[str, NumericType]) -> NoneSet a dictionary of metrics on the given span.
method
ddtrace._trace.span.Span.set_tag(key:str, value:Optional[str]=None) -> NoneSet a tag key/value pair on the span.
method
ddtrace._trace.span.Span.set_tags(tags:dict[str, str]) -> NoneSet a dictionary of tags on the given span.
class
ddtrace._trace.subscribers.llm.LlmTracingSubscriberShared tracing logic for all LLM integrations.
method
ddtrace._trace.subscribers.llm.LlmTracingSubscriber.on_ended(ctx:core.ExecutionContext['LlmRequestEvent'], exc_info:tuple[Optional[type], Optional[BaseException], Optional[TracebackType]]) -> NoneSet LLMObs tags on the span.
class
ddtrace._trace.subscribers.ray.RayCoreAPITracingSubscriberSubscriber for core API calls (ray.get/wait/put).
class
ddtrace._trace.subscribers.ray.RayExecutionSubscriberSubscriber for ray.execute context
class
ddtrace._trace.subscribers.ray.RayJobStartSubscriberSubscriber for ray.job context
method
ddtrace._trace.tracer.Tracer.agent_trace_url() -> Optional[str]Trace agent url
method
ddtrace._trace.tracer.Tracer.current_span() -> Optional[Span]Return the active span in the current execution context.
method
ddtrace._trace.tracer.Tracer.current_trace_context(*args, **kwargs) -> Optional[Context]Return the context for the current trace.
method
ddtrace._trace.tracer.Tracer.flush()Flush the buffer of the trace writer.
method
ddtrace._trace.tracer.Tracer.set_tags(tags:dict[str, str]) -> NoneSet some tags at the tracer level.
method
ddtrace._trace.tracer.Tracer.shutdown(timeout:Optional[float]=None) -> NoneShutdown the tracer and flush finished traces.
class
ddtrace.aiguard._api_client.AIGuardClientErrorException for AI Guard client errors.
class
ddtrace.aiguard._api_client.OptionsOptional evaluation behavior.
func
ddtrace.aiguard._initialization.load_ai_guard() -> NoneLazily load the ai_guard module listeners.
class
ddtrace.aiguard.integrations.strands.AIGuardStrandsIntegrationShared AI Guard evaluation logic for Strands Agents.
class
ddtrace.aiguard.integrations.strands.AIGuardStrandsPluginAI Guard security plugin for Strands Agents.
func
ddtrace.aiguard.messages.try_format_json(value:Any) -> strFormat a value as a JSON string, falling back to str() on failure.
func
ddtrace.appsec._asm_request_context.get_or_create_rasp_subcontext(ddwaf:Any, ctx:Any, rule_type:Optional[str]) -> Optional[Any]Return the subcontext to use for a RASP WAF call.
func
ddtrace.appsec._asm_request_context.should_analyze_body_response(env:ASM_Environment) -> boolCheck if we should analyze body for API10.
func
ddtrace.appsec._common_module_patches.popen_FD233052260D8B4D(arg_list:Union[list[str], str, bytes]) -> Nonelistener for subprocess.Popen class
func
ddtrace.appsec._common_module_patches.wrapped_system_5542593D237084A7(command:Union[str, bytes]) -> Nonewrapper for os.system function
class
ddtrace.appsec._constants.API_SECURITYconstants related to API Security
class
ddtrace.appsec._constants.APPSECSpecific constants for AppSec
class
ddtrace.appsec._constants.IASTSpecific constants for IAST
class
ddtrace.appsec._constants.IAST_SPAN_TAGSSpecific constants for IAST span tags
class
ddtrace.appsec._constants.LOGIN_EVENTS_MODEstring identifier for the mode of the user login events.
class
ddtrace.appsec._constants.PRODUCTSstring identifier for remote config products
class
ddtrace.appsec._constants.SCASCA (Software Composition Analysis) related constants.
class
ddtrace.appsec._constants.WAF_ACTIONSstring identifier for actions returned by the waf
class
ddtrace.appsec._ddwaf.ddwaf_types.ddwaf_object_kvA key/value pair stored in a ddwaf_object map.
func
ddtrace.appsec._http_utils.extract_cookies_from_headers(normalized_headers:MutableMapping[str, str]) -> Optional[dict[str, str]]Extract cookies from the WAF headers.
func
ddtrace.appsec._http_utils.normalize_headers(request_headers:Mapping[str, str]) -> dict[str, str]Normalize headers according to the WAF expectations.
class
ddtrace.appsec._iast._patch_modules.IASTFunctionRepresents a function to be patched for IAST analysis.
class
ddtrace.appsec._iast._patch_modules.WrapFunctonsForIASTManages the collection and patching of IAST modules.
func
ddtrace.appsec._iast._taint_tracking.aspects.template_string_aspect(*args:list[Any]) -> AnyAspect for PEP-750 template strings (t-strings).
func
ddtrace.appsec._iast.load_iast()Lazily load the iast module listeners.
class
ddtrace.appsec._iast.reporter.IastSpanReporterClass representing an IAST span reporter.
method
ddtrace.appsec._iast.reporter.IastSpanReporter.get_unredacted_value_parts(evidence_value:str, ranges:list[dict], sources:list[Any]) -> list[dict]Gets unredacted value parts of evidence.
method
ddtrace.appsec._iast.reporter.IastSpanReporter.taint_ranges_as_evidence_info(pyobject:Any) -> tuple[list[Source], list[dict]]Extracts tainted ranges as evidence information.
func
ddtrace.appsec._iast.secure_marks.configuration.parse_parameters(positions_string:str) -> list[int]Parse comma-separated parameter positions.
func
ddtrace.appsec._iast.secure_marks.validators.cmdi_validator(wrapped:Callable, instance:Any, args:Sequence, kwargs:dict) -> boolValidator for command quoting functions.
func
ddtrace.appsec._iast.secure_marks.validators.path_traversal_validator(wrapped:Callable, instance:Any, args:Sequence, kwargs:dict) -> boolValidator for secure filename functions.
func
ddtrace.appsec._iast.secure_marks.validators.sqli_validator(wrapped:Callable, instance:Any, args:Sequence, kwargs:dict) -> boolValidator for SQL quoting functions.
func
ddtrace.appsec._iast.secure_marks.validators.ssrf_validator(wrapped:Callable, instance:Any, args:Sequence, kwargs:dict) -> boolValidator for ssrf functions.
func
ddtrace.appsec._iast.secure_marks.validators.unvalidated_redirect_validator(wrapped:Callable, instance:Any, args:Sequence, kwargs:dict) -> boolValidator for unvalidated redirect functions.
func
ddtrace.appsec._iast.taint_sinks.weak_cipher.patch()Wrap hashing functions.
func
ddtrace.appsec._iast.taint_sinks.weak_hash.patch()Wrap hashing functions.
func
ddtrace.appsec._listeners.load_appsec(reconfigure_tracer:bool=False, origin:str='') -> boolLazily load the appsec module listeners.
func
ddtrace.appsec._listeners.load_common_appsec_modules() -> NoneLazily load the common module patches.
func
ddtrace.appsec._metrics.report_error(msg:str, version:str, action:str, error_level:bool=True) -> Noneused for waf configuration errors
func
ddtrace.appsec._metrics.report_waf_run_error(error:int, rule_version:str, rule_type:Optional[str]) -> Noneused for waf run errors
class
ddtrace.appsec._remoteconfiguration.AppSecCallbackRemote config callback for AppSec products.
func
ddtrace.appsec._trace_utils.should_block_user(tracer:Any, userid:str, session_id:Optional[str]=None) -> boolReturn true if the specified User ID should be blocked.
func
ddtrace.appsec._trace_utils.track_custom_event(tracer:Any, event_name:str, metadata:dict[str, Any]) -> NoneAdd a new custom tracking event.
class
ddtrace.appsec.sca._instrumenter.InstrumenterManages bytecode instrumentation of target functions.
method
ddtrace.appsec.sca._instrumenter.Instrumenter.instrument(qualified_name:str, func:FunctionType) -> boolInstrument a function with SCA detection hook.
func
ddtrace.appsec.sca._instrumenter.get_instrumenter(registry:InstrumentationRegistry) -> InstrumenterGet or create the singleton Instrumenter instance.
func
ddtrace.appsec.sca._instrumenter.sca_detection_hook(qualified_name:str) -> NoneHook injected into instrumented functions.
func
ddtrace.appsec.sca._instrumenter.set_registry(registry:InstrumentationRegistry) -> NoneSet global registry reference.
class
ddtrace.appsec.sca._registry.InstrumentationRegistryThread-safe registry of instrumentation state.
method
ddtrace.appsec.sca._registry.InstrumentationRegistry.merge_cve_ids(qualified_name:str, new_cve_ids:list[str]) -> boolMerge additional CVE IDs into an existing target.
class
ddtrace.appsec.sca._registry.InstrumentationStateState for a single instrumented target.
class
ddtrace.appsec.sca._registry.TargetInfoImmutable snapshot of vulnerability info for a target.
func
ddtrace.appsec.sca._registry.get_global_registry() -> InstrumentationRegistryGet or create global registry instance.
class
ddtrace.appsec.sca._resolver.SymbolResolverResolve qualified names to Python callables.
method
ddtrace.appsec.sca._resolver.SymbolResolver.resolve(qualified_name:str) -> Optional[tuple[str, FunctionType]]Resolve a qualified name to a callable.
func
ddtrace.appsec.track_user_sdk.track_custom_event(event_name:str, metadata:dict[str, t.Any]) -> NoneTrack a custom user event.
func
ddtrace.appsec.track_user_sdk.track_login_failure(login:str, exists:bool, user_id:t.Any=None, metadata:t.Optional[dict[str, t.Any]]=None, _auto:bool=False) -> NoneTrack a failed user login event.
func
ddtrace.appsec.track_user_sdk.track_login_success(login:str, user_id:t.Any=None, metadata:t.Optional[dict[str, t.Any]]=None, _auto:bool=False) -> NoneTrack a successful user login event.
func
ddtrace.appsec.track_user_sdk.track_signup(login:str, user_id:t.Any=None, success:bool=True, metadata:t.Optional[dict[str, t.Any]]=None, _auto:bool=False) -> NoneTrack a user signup event.
func
ddtrace.appsec.track_user_sdk.track_user(login:str, user_id:t.Any=None, session_id:t.Optional[str]=None, metadata:t.Optional[dict[str, t.Any]]=None, _auto:bool=False) -> NoneTrack an authenticated user.
class
ddtrace.contrib._events.http.HttpBaseEventCommon HTTP request/response data.
class
ddtrace.contrib._events.http.HttpRequestBaseEventBase event for traced HTTP requests.
class
ddtrace.contrib._events.http_client.HttpClientRequestEventHTTP client request event
class
ddtrace.contrib._events.llm.LlmRequestEventLLM request event for all LLM integrations.
class
ddtrace.contrib.dbapi.TracedConnectionTracedConnection wraps a Connection with tracing code.
class
ddtrace.contrib.dbapi.TracedCursorTracedCursor wraps a psql cursor and traces its queries.
method
ddtrace.contrib.dbapi.TracedCursor.callproc(proc, *args)Wraps the cursor.callproc method
method
ddtrace.contrib.dbapi.TracedCursor.execute(query, *args, **kwargs)Wraps the cursor.execute method
class
ddtrace.contrib.dbapi_async.FetchTracedAsyncCursorFetchTracedAsyncCursor for psycopg
func
ddtrace.contrib.internal.aredis.patch.patch()Patch the instrumented methods
func
ddtrace.contrib.internal.avro.patch.patch()Patch the instrumented methods
func
ddtrace.contrib.internal.botocore.services.bedrock.handle_bedrock_request(ctx:core.ExecutionContext) -> NonePerform request param extraction and tagging.
func
ddtrace.contrib.internal.bottle.patch.patch()Patch the bottle.Bottle class
func
ddtrace.contrib.internal.celery.utils.set_tags_from_context(span:Span, context:dict[str, Any]) -> NoneHelper to extract meta values from a Celery Context
func
ddtrace.contrib.internal.coverage.patch.coverage_report_wrapper(func:Any, instance:Any, args:tuple, kwargs:dict) -> AnyWrapper to cache percentage when report() is called.
func
ddtrace.contrib.internal.coverage.patch.erase_coverage() -> NoneErase all coverage data and clear the cache.
func
ddtrace.contrib.internal.coverage.patch.get_coverage_instance() -> Optional[Any]Get the current Coverage instance.
func
ddtrace.contrib.internal.coverage.patch.reset_coverage_state() -> NoneReset all coverage state.
func
ddtrace.contrib.internal.coverage.patch.set_coverage_instance(cov_instance:Any) -> NoneSet the current coverage instance.
func
ddtrace.contrib.internal.coverage.patch.start_coverage(source:Any=None, omit:Any=None, include:Any=None, config_file:Any=True, auto_data:bool=False, data_suffix:Optional[str]=None, **kwargs:Any) -> Optional[Any]Start coverage collection.
func
ddtrace.contrib.internal.coverage.patch.stop_coverage(save:bool=True, erase:bool=False) -> Optional[Any]Stop coverage collection.
func
ddtrace.contrib.internal.coverage.patch.unpatch()Remove Coverage.py patching.
func
ddtrace.contrib.internal.django.cache.func_cache_operation(func:FunctionType) -> strReturns the cache operation name for the given function.
func
ddtrace.contrib.internal.django.middleware.wrap_middleware(mw:Any, mw_path:str) -> NoneWraps a Django middleware class or function.
func
ddtrace.contrib.internal.django.patch.instrument_view(django, view)Helper to wrap Django views.
func
ddtrace.contrib.internal.django.restframework.patch_restframework(django)Patches rest_framework app.
func
ddtrace.contrib.internal.django.utils.quantize_key_values(keys:_quantize_param) -> TextUsed for Django cache key normalization.
func
ddtrace.contrib.internal.django.utils.resource_from_cache_prefix(resource:str, cache:Any) -> strCombine the resource name with the cache prefix (if any)
func
ddtrace.contrib.internal.flask.patch.patch()Patch `flask` module for tracing
func
ddtrace.contrib.internal.gevent.patch.unpatch()Restore the original ``Greenlet``.
func
ddtrace.contrib.internal.google_adk.patch.unpatch()Unpatch the `google.adk` library.
func
ddtrace.contrib.internal.kombu.utils.get_routing_key_from_args(args)Extract the routing key
func
ddtrace.contrib.internal.llama_index._utils.build_agent_run_request_kwargs(args:tuple[Any, ...], kwargs:dict[str, Any]) -> dict[str, Any]Build trace kwargs for agent ``run()``.
func
ddtrace.contrib.internal.llama_index._utils.get_model_provider(instance:Any) -> strExtract the LLM provider name from a LlamaIndex instance.
func
ddtrace.contrib.internal.openai_agents.patch.patch()Patch the instrumented methods
func
ddtrace.contrib.internal.protobuf.patch.patch()Patch the instrumented methods
class
ddtrace.contrib.internal.psycopg.async_cursor.Psycopg3FetchTracedAsyncCursorPsycopg3FetchTracedAsyncCursor for psycopg
class
ddtrace.contrib.internal.psycopg.cursor.Psycopg2FetchTracedCursorFetchTracedCursor for psycopg2
class
ddtrace.contrib.internal.psycopg.cursor.Psycopg2TracedCursorTracedCursor for psycopg2
class
ddtrace.contrib.internal.psycopg.cursor.Psycopg3FetchTracedCursorPsycopg3FetchTracedCursor for psycopg
class
ddtrace.contrib.internal.psycopg.cursor.Psycopg3TracedCursorTracedCursor for psycopg instances
func
ddtrace.contrib.internal.pymemcache.patch.unpatch()Remove pymemcache tracing
func
ddtrace.contrib.internal.pymongo.client.parse_socket_command_spec(args, kwargs)Parse socket command spec.
func
ddtrace.contrib.internal.pymongo.utils.is_query(op)Check if operation is a query.
func
ddtrace.contrib.internal.pymongo.utils.normalize_filter(f=None)Normalize filter queries.
func
ddtrace.contrib.internal.pymongo.utils.set_address_tags(span, address)Set address tags on span.
func
ddtrace.contrib.internal.pyramid.patch.patch()Patch pyramid.config.Configurator
func
ddtrace.contrib.internal.pytest._plugin_v2.pytest_runtest_makereport(item:pytest.Item, call:pytest_CallInfo) -> NoneStore outcome for tracing.
func
ddtrace.contrib.internal.pytest.plugin.pytest_addoption(parser)Add ddtrace options.
func
ddtrace.contrib.internal.pytorch._c_tracer.clear_parent_context() -> NoneClear the process-wide parent context.
func
ddtrace.contrib.internal.pytorch._device.discover(local_rank:int) -> DeviceInfoResolve and cache the device id.
func
ddtrace.contrib.internal.pytorch._rank_root.close() -> NoneFinish the per-rank span.
func
ddtrace.contrib.internal.pytorch._rank_root.open_rank_span(rank:int, world_size:int, framework:str, training_job_id:Optional[str]) -> NoneOpen the per-rank lifetime span.
func
ddtrace.contrib.internal.pytorch._utils.restore_run_metadata_snapshot(snapshot:dict[str, Any]) -> NoneReplace the cache with a previously taken snapshot.
func
ddtrace.contrib.internal.pytorch._utils.set_cached_run_metadata(*run_name:Optional[str]=None, *submission_id:Optional[str]=None, *metadata:Optional[dict[str, Any]]=None) -> NoneUpdate the run-metadata cache.
func
ddtrace.contrib.internal.ray.core.api.traced_get(wrapped, instance, args, kwargs)Trace the calls of ray.get
func
ddtrace.contrib.internal.ray.core.api.traced_put(wrapped, instance, args, kwargs)Trace the calls of ray.put
func
ddtrace.contrib.internal.ray.core.api.traced_wait(wrapped, instance, args, kwargs)Trace the calls of ray.wait
func
ddtrace.contrib.internal.ray.core.utils.extract_signature(func:Any, ignore_first:bool=False) -> list[Parameter]Extract the function signature from the function.
func
ddtrace.contrib.internal.ray.core.utils.get_dd_job_name_from_entrypoint(entrypoint:str)Get the job name from the entrypoint.
func
ddtrace.contrib.internal.ray.core.utils.get_signature(func:Any) -> inspect.SignatureGet signature parameters.
func
ddtrace.contrib.internal.ray.core.utils.redact_paths(s:str) -> strRedact path-like substrings from an entry-point string.
func
ddtrace.contrib.internal.ray.patch.traced_submit_job(wrapped, instance, args, kwargs)Trace job submission.
func
ddtrace.contrib.internal.rediscluster.patch.patch()Patch the instrumented methods
func
ddtrace.contrib.internal.requests.patch.patch()Activate http calls tracing
func
ddtrace.contrib.internal.requests.patch.unpatch()Disable traced sessions
func
ddtrace.contrib.internal.rq.patch.traced_job_perform(rq, pin, func, instance, args, kwargs)Trace rq.Job.perform(...)
func
ddtrace.contrib.internal.sanic.patch.patch()Patch the instrumented methods.
func
ddtrace.contrib.internal.sanic.patch.unpatch()Unpatch the instrumented methods.
class
ddtrace.contrib.internal.subprocess.patch.SubprocessCmdLineParser and scrubber for subprocess command lines.
method
ddtrace.contrib.internal.subprocess.patch.SubprocessCmdLine.truncate_string(str_:str) -> strTruncate a string if it exceeds the size limit.
func
ddtrace.contrib.internal.subprocess.patch.del_lst_callback(name:str)Remove a list command callback.
func
ddtrace.contrib.internal.subprocess.patch.del_str_callback(name:str)Remove a string command callback.
func
ddtrace.contrib.internal.vllm.extractors.parse_prompt_to_messages(prompt:Optional[str]) -> list[Message]Parse a formatted prompt into structured messages.
func
ddtrace.contrib.internal.vllm.utils.set_latency_metrics(span:Span, latency_metrics:Optional[LatencyMetrics]) -> NoneSet latency span tags from pre-computed metrics.
func
ddtrace.contrib.internal.yaaredis.patch.patch()Patch the instrumented methods
method
ddtrace.debugging._debugger.Debugger.disable(join:bool=True) -> NoneDisable dynamic instrumentation.
class
ddtrace.debugging._debugger.DebuggerErrorGeneric debugger error.
method
ddtrace.debugging._encoding.Encoder.encode(item:Any) -> bytesEncode the given snapshot.
func
ddtrace.debugging._exception.replay.exception_ident(exc:BaseException, tb:t.Optional[TracebackType]) -> intCompute the identity of an exception.
func
ddtrace.debugging._exception.replay.get_tb_frames_from_exception_chain(chain:ExceptionChain) -> t.Generator[tuple[int, TracebackType], None, None]Get the frames from the exception chain.
class
ddtrace.debugging._function.discovery.FullyNamedA fully named object.
class
ddtrace.debugging._function.discovery.FullyNamedFunctionA fully named function object.
class
ddtrace.debugging._function.discovery.FunctionDiscoveryDiscover all function objects in a module.
method
ddtrace.debugging._function.discovery.FunctionDiscovery.at_line(line:int) -> list[FullyNamedFunction]Get the functions at the given line.
method
ddtrace.debugging._function.discovery.FunctionDiscovery.by_name(qualname:str) -> FullyNamedFunctionGet the function by its qualified name.
class
ddtrace.debugging._function.store.FullyNamedContextWrappedFunctionA fully named wrapper function.
class
ddtrace.debugging._function.store.FunctionStoreFunction object store.
method
ddtrace.debugging._function.store.FunctionStore.eject_hook(function:FunctionType, hook:HookType, line:int, arg:Any) -> boolEject a hook from a function.
method
ddtrace.debugging._function.store.FunctionStore.eject_hooks(function:FunctionType, hooks:list[HookInfoType]) -> set[str]Bulk-eject hooks from a function.
method
ddtrace.debugging._function.store.FunctionStore.inject_hook(function:FullyNamedContextWrappedFunction, hook:HookType, line:int, arg:Any) -> boolInject a hook into a function.
method
ddtrace.debugging._function.store.FunctionStore.inject_hooks(function:FullyNamedContextWrappedFunction, hooks:list[HookInfoType]) -> set[str]Bulk-inject hooks into a function.
method
ddtrace.debugging._function.store.FunctionStore.unwrap(function:FullyNamedContextWrappedFunction) -> NoneUnwrap a hook around a wrapped function.
method
ddtrace.debugging._function.store.FunctionStore.wrap(function:FunctionType, wrapping_context:WrappingContext) -> NoneWrap a function with a hook.
class
ddtrace.debugging._origin.span.EntrySpanWrappingContextEntry span wrapping context.
method
ddtrace.debugging._probe.model.Probe.update(other:'Probe') -> NoneUpdate the mutable fields from another probe.
class
ddtrace.debugging._probe.model.ProbeConditionMixinConditional probe.
class
ddtrace.debugging._probe.registry.ProbeRegistryKeep track of all the registered probes.
method
ddtrace.debugging._probe.registry.ProbeRegistry.get_pending(location:str) -> list[Probe]Get the currently pending probes by location.
method
ddtrace.debugging._probe.registry.ProbeRegistry.log_probe_status(probe:Probe) -> NoneLog the status of a probe using the status logger.
method
ddtrace.debugging._probe.registry.ProbeRegistry.register(*probes:Probe) -> NoneRegister a probe.
method
ddtrace.debugging._probe.registry.ProbeRegistry.set_emitting(probe:Probe) -> NoneSet the emitting flag for a probe.
method
ddtrace.debugging._probe.registry.ProbeRegistry.set_error(probe:Probe, error_type:str, message:str) -> NoneSet the error message for a probe.
method
ddtrace.debugging._probe.registry.ProbeRegistry.set_installed(probe:Probe) -> NoneSet the installed flag for a probe.
method
ddtrace.debugging._probe.registry.ProbeRegistry.unregister(*probes:Probe) -> list[Probe]Unregister a collection of probes.
func
ddtrace.debugging._probe.remoteconfig.build_probe(attribs:dict[str, Any]) -> ProbeCreate a new Probe instance.
func
ddtrace.debugging._safety.get_globals(frame:FrameType) -> Iterator[tuple[str, Any]]Get global variables referenced by the frame's code object.
class
ddtrace.debugging._signal.collector.SignalCollectorDebugger signal collector.
class
ddtrace.debugging._signal.log.LogSignalA signal that also emits a log message.
method
ddtrace.debugging._signal.log.LogSignal.has_message() -> boolWhether the signal has a log message to emit.
method
ddtrace.debugging._signal.log.LogSignal.message() -> t.Optional[str]The log message to emit.
class
ddtrace.debugging._signal.metric_sample.MetricSampleWrapper for making a metric sample
class
ddtrace.debugging._signal.model.SignalDebugger signal base class.
class
ddtrace.debugging._signal.snapshot.SnapshotRaw snapshot.
class
ddtrace.debugging._signal.tracing.DynamicSpanDynamically created span
class
ddtrace.debugging._signal.tracing.SpanDecorationDecorate a span.
class
ddtrace.debugging._signal.trigger.TriggerTrigger a session creation.
func
ddtrace.debugging._signal.utils.serialize(value:Any, level:int=MAXLEVEL, maxsize:int=MAXSIZE, maxlen:int=MAXLEN, maxfields:int=MAXFIELDS) -> strPython object serializer.
class
ddtrace.debugging._uploader.SignalUploaderSignal uploader.
method
ddtrace.debugging._uploader.SignalUploader.reset() -> NoneReset the buffer on fork.
method
ddtrace.debugging._uploader.SignalUploader.upload() -> NoneUpload request.
class
ddtrace.debugging._uploader.SignalUploaderErrorSignal uploader error.
class
ddtrace.debugging._uploader.UploaderProductUploader products.
func
ddtrace.ext.aws.get_aws_partition(region_name:str) -> strDetermine AWS partition from region name.
func
ddtrace.ext.aws.truncate_arg_value(value:Any, max_len:int=1024) -> AnyTruncate values which are bytes and greater than `max_len`.
func
ddtrace.ext.ci.extract_appveyor(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Appveyor environ.
func
ddtrace.ext.ci.extract_azure_pipelines(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Azure pipelines environ.
func
ddtrace.ext.ci.extract_bitbucket(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Bitbucket environ.
func
ddtrace.ext.ci.extract_bitrise(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Bitrise environ.
func
ddtrace.ext.ci.extract_buddy(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Buddy environ.
func
ddtrace.ext.ci.extract_buildkite(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Buildkite environ.
func
ddtrace.ext.ci.extract_circle_ci(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from CircleCI environ.
func
ddtrace.ext.ci.extract_codebuild(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from codebuild environments.
func
ddtrace.ext.ci.extract_codefresh(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Codefresh environ.
func
ddtrace.ext.ci.extract_drone(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Drone environ.
func
ddtrace.ext.ci.extract_github_actions(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Github Actions environment.
func
ddtrace.ext.ci.extract_gitlab(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Gitlab environ.
func
ddtrace.ext.ci.extract_jenkins(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Jenkins environ.
func
ddtrace.ext.ci.extract_teamcity(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Teamcity environ.
func
ddtrace.ext.ci.extract_travis(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Travis environ.
func
ddtrace.ext.ci.github_actions.extract_github_actions(environ:MutableMapping[str, str]) -> dict[str, Optional[str]]Extract CI tags from Github Actions environment.
func
ddtrace.ext.git.extract_git_metadata(cwd:Optional[str]=None) -> dict[str, Optional[str]]Extract git commit metadata.
func
ddtrace.ext.sql.normalize_vendor(vendor:str) -> strReturn a canonical name for a type of database.
func
ddtrace.internal.atexit.unregister(func:typing.Callable) -> NoneUnregister *func* from atexit, handling the safe-wrapper indirection.
func
ddtrace.internal.bytecode_injection.core.append_instruction(opcode:int, extended_arg:int) -> NoneAppend an operation and its argument to the new bytecode.
func
ddtrace.internal.bytecode_injection.eject_hook(f:FunctionType, hook:HookType, line:int, arg:Any) -> FunctionTypeEject a hook from a function.
func
ddtrace.internal.bytecode_injection.eject_hooks(f:FunctionType, hooks:list[HookInfoType]) -> list[HookInfoType]Bulk-eject a list of hooks from a function.
func
ddtrace.internal.bytecode_injection.inject_hook(f:FunctionType, hook:HookType, line:int, arg:Any) -> FunctionTypeInject a hook into a function.
func
ddtrace.internal.bytecode_injection.inject_hooks(f:FunctionType, hooks:list[HookInfoType]) -> list[HookInfoType]Bulk-inject a list of hooks into a function.
func
ddtrace.internal.ci_visibility.coverage.segments(lines:Iterable[int]) -> list[tuple[int, int, int, int, int]]Extract the relevant report data for a single file.
func
ddtrace.internal.ci_visibility.service_registry.register_ci_visibility_instance(service:'CIVisibility') -> NoneRegister the CIVisibility service instance.
func
ddtrace.internal.ci_visibility.service_registry.unregister_ci_visibility_instance() -> NoneUnregister the current service instance.
func
ddtrace.internal.ci_visibility.utils.combine_url_path(*args:str)Combine URL path segments.
func
ddtrace.internal.compat.ip_is_global(ip:str) -> boolis_global is Python 3+ only.
func
ddtrace.internal.compat.is_integer(obj:Any) -> boolHelper to determine if the provided ``obj`` is an integer type or not
func
ddtrace.internal.core.event_hub.dispatch_event(event:Event, allow_raise:bool=False) -> NoneCall all hooks for the provided event.
func
ddtrace.internal.core.find_item(data_key:str, default:Optional[Any]=None) -> AnyFind an item by its key, traversing up the context tree.
func
ddtrace.internal.core.get_items(data_keys:list[str]) -> list[Optional[Any]]Return multiple items by their keys, only in the local context.
class
ddtrace.internal.core.subscriber.ContextSubscriberBase class for context event subscribers.
class
ddtrace.internal.core.subscriber.SubscriberBase class for event subscribers.
class
ddtrace.internal.datastreams.processor.PathwayStatsAggregated pathway statistics.
func
ddtrace.internal.debug.collect(tracer_info:TracerDebugInfo) -> dict[str, Any]Collect system and library information into a serializable dict.
class
ddtrace.internal.encoding.AgentlessTraceJSONEncoderBuffered encoder for the agentless JSON trace intake.
class
ddtrace.internal.encoding.JSONEncoderV2JSONEncoderV2 encodes traces to the new intake API format.
class
ddtrace.internal.endpoints.SingletonSingleton Class.
func
ddtrace.internal.excepthook.unregister(hook:ExceptHookType) -> NoneRemove a previously registered callback.
class
ddtrace.internal.flare._subscribers.TracerFlareCallbackRemote config callback for tracer flare requests.
func
ddtrace.internal.gitmetadata.clean_tags(tags:dict[str, str]) -> dict[str, str]Cleanup tags from git metadata
func
ddtrace.internal.iast.product.restart(join=False)Restart the IAST product.
func
ddtrace.internal.iast.product.start()Start the IAST product.
func
ddtrace.internal.iast.product.stop(join=False)Stop the IAST product.
func
ddtrace.internal.logger.set_tag_rate_limit(tag:str, rate:int) -> NoneSet the rate limit for a specific tag.
class
ddtrace.internal.metrics.MetricsHigher-level DogStatsD interface.
class
ddtrace.internal.module.BaseModuleWatchdogBase module watchdog.
method
ddtrace.internal.module.BaseModuleWatchdog.install() -> NoneInstall the module watchdog.
method
ddtrace.internal.module.BaseModuleWatchdog.is_installed() -> boolCheck whether this module watchdog class is installed.
method
ddtrace.internal.module.BaseModuleWatchdog.uninstall() -> NoneUninstall the module watchdog.
class
ddtrace.internal.module.ModuleWatchdogModule watchdog.
method
ddtrace.internal.module.ModuleWatchdog.get_by_origin(_origin:Path) -> t.Optional[ModuleType]Lookup a module by its origin.
func
ddtrace.internal.module.origin(module:ModuleType) -> t.Optional[Path]Get the origin source file of the module.
func
ddtrace.internal.module.register_post_run_module_hook(hook:ModuleHookType) -> NoneRegister a post run module hook.
func
ddtrace.internal.module.register_run_module_transformer(transformer:TransformerType) -> NoneRegister a run module transformer.
func
ddtrace.internal.module.unregister_post_run_module_hook(hook:ModuleHookType) -> NoneUnregister a post run module hook.
func
ddtrace.internal.module.unregister_run_module_transformer(transformer:TransformerType) -> NoneUnregister a run module transformer.
class
ddtrace.internal.native_runtime.NativeRuntimeManages a SharedRuntime with fork-safe lifecycle hooks.
method
ddtrace.internal.native_runtime.NativeRuntime.shutdown(timeout_ms:Optional[int]=None) -> NoneShut down the shared Tokio runtime.
func
ddtrace.internal.openfeature._agentless.build_agentless_endpoint(site:str, env:Optional[str]=None, base_url:Optional[str]=None) -> strBuild the agentless UFC endpoint URL.
class
ddtrace.internal.openfeature._flagevaluation_writer.FlagEvaluationWriterSDK-native EVP `flagevaluation` writer.
class
ddtrace.internal.openfeature._provider.DataDogProviderDatadog OpenFeature Provider.
method
ddtrace.internal.openfeature._provider.DataDogProvider.clear_exposure_cache() -> NoneClear the exposure event cache.
method
ddtrace.internal.openfeature._provider.DataDogProvider.get_metadata() -> MetadataReturns provider metadata.
method
ddtrace.internal.openfeature._provider.DataDogProvider.get_provider_hooks() -> list[typing.Any]Returns provider-level hooks.
method
ddtrace.internal.openfeature._provider.DataDogProvider.shutdown() -> NoneShutdown the provider.
class
ddtrace.internal.openfeature._span_enrichment.SpanEnrichmentStatePer-root-span accumulator.
class
ddtrace.internal.openfeature.writer.BatchedExposuresBatched exposure events with context.
class
ddtrace.internal.openfeature.writer.ContextContext information for batched exposures.
class
ddtrace.internal.openfeature.writer.ExposureEventFeature flag exposure event structure.
class
ddtrace.internal.openfeature.writer.ExposureWriterAsync writer for feature flag exposure events.
method
ddtrace.internal.openfeature.writer.ExposureWriter.enqueue(event:ExposureEvent) -> NoneEnqueue an exposure event to be sent to the intake.
method
ddtrace.internal.openfeature.writer.ExposureWriter.periodic() -> NonePeriodically flush buffered events to the intake.
class
ddtrace.internal.openfeature.writer.GeoContextGeographic context information.
method
ddtrace.internal.opentelemetry.span.Span.add_event(name, attributes=None, timestamp=None)Records an event
method
ddtrace.internal.opentelemetry.span.Span.end(end_time=None)Marks the end time of a span.
method
ddtrace.internal.opentelemetry.span.Span.kind()Gets span kind attribute
method
ddtrace.internal.opentelemetry.span.Span.set_attributes(attributes)Sets attributes/tags
method
ddtrace.internal.opentelemetry.span.Span.update_name(name)Updates the name of a span
func
ddtrace.internal.packages.get_version_for_package(name:str) -> strreturns the version of a package
func
ddtrace.internal.packages.module_to_package(module:ModuleType) -> t.Optional[Distribution]Returns the package distribution for a module
class
ddtrace.internal.periodic.PeriodicServiceA service that runs periodically.
class
ddtrace.internal.rate_limiter.BudgetRateLimiterWithJitterA budget rate limiter with jitter.
class
ddtrace.internal.rate_limiter.RateLimiterA token bucket rate limiter implementation
class
ddtrace.internal.remoteconfig.ConfigMetadataConfiguration TUF target metadata
class
ddtrace.internal.remoteconfig.RCCallbackBase class for remote config callbacks.
method
ddtrace.internal.remoteconfig.RCCallback.periodic() -> NoneMethod called at every polling operation.
class
ddtrace.internal.remoteconfig.worker.RemoteConfigPollerRemote configuration worker.
method
ddtrace.internal.remoteconfig.worker.RemoteConfigPoller.disable_product(product:'RemoteConfigProduct') -> NoneDisable a product, removing it from client payloads.
method
ddtrace.internal.remoteconfig.worker.RemoteConfigPoller.enable_product(product:'RemoteConfigProduct') -> NoneEnable a product to be included in client payloads.
method
ddtrace.internal.remoteconfig.worker.RemoteConfigPoller.get_registered(product:'RemoteConfigProduct') -> Optional[RCCallback]Get the registered callback for a product.
method
ddtrace.internal.remoteconfig.worker.RemoteConfigPoller.reset_at_fork() -> NoneRefresh client state after a fork.
method
ddtrace.internal.remoteconfig.worker.RemoteConfigPoller.unregister_callback(product:'RemoteConfigProduct') -> NoneUnregister a product callback.
func
ddtrace.internal.runtime.get_parent_runtime_id() -> t.Optional[str]Return the runtime ID of the parent process.
func
ddtrace.internal.runtime.get_runtime_id() -> strReturn a unique string identifier for this runtime.
class
ddtrace.internal.runtime.metric_collectors.PSUtilRuntimeMetricCollectorCollector for psutil metrics.
func
ddtrace.internal.runtime.on_runtime_id_change(cb:t.Callable[[str], None]) -> NoneRegister a callback to be called when the runtime ID changes.
class
ddtrace.internal.runtime.tag_collectors.ProcessTagCollectorTag collector for process tags.
class
ddtrace.internal.runtime.tag_collectors.TracerTagCollectorTag collector for the ddtrace Tracer
class
ddtrace.internal.safety.SafeObjectProxyObject proxy to make sure we don't call unsafe code.
method
ddtrace.internal.safety.SafeObjectProxy.safe(obj:Any) -> Optional[Any]Turn an object into a safe proxy.
func
ddtrace.internal.safety.get_slots(obj:Any) -> set[str]Get the object's slots.
func
ddtrace.internal.sca.product.restart(join:bool=False) -> NoneHandle fork scenarios by restarting SCA detection in child process.
func
ddtrace.internal.sca.product.stop(join:bool=False) -> NoneCleanup SCA detection on shutdown.
class
ddtrace.internal.service.ServiceA service that can be started or stopped.
method
ddtrace.internal.service.Service.join(timeout:typing.Optional[float]=None) -> NoneJoin the service once stopped.
method
ddtrace.internal.service.Service.start(*args:typing.Any, **kwargs:typing.Any) -> NoneStart the service.
method
ddtrace.internal.service.Service.stop(*args:typing.Any, **kwargs:typing.Any) -> NoneStop the service.
class
ddtrace.internal.service.ServiceStatusA Service status.
func
ddtrace.internal.settings.asm.build_libddwaf_filename() -> strBuild the filename of the libddwaf library to load.
class
ddtrace.internal.settings.env.EnvConfigA MutableMapping wrapper around os.environ.
method
ddtrace.internal.settings.http.HttpConfig.header_is_traced(header_name:str) -> boolReturns whether or not the current header should be traced.
class
ddtrace.internal.settings.integration.HooksDeprecated no-op Hooks class for backwards compatibility.
class
ddtrace.internal.settings.integration.IntegrationConfigIntegration specific configuration object.
class
ddtrace.internal.sma.SimpleMovingAverageSimple Moving Average implementation.
method
ddtrace.internal.sma.SimpleMovingAverage.set(count:int, total:int) -> NoneSet the value of the next bucket and update the SMA value.
class
ddtrace.internal.symbol_db.symbols.ScopeA scope is a collection of symbols.
method
ddtrace.internal.symbol_db.symbols.Scope.from_module(module:ModuleType) -> 'Scope'Get the scope of a module.
class
ddtrace.internal.symbol_db.symbols.SymbolA symbol available from a scope.
class
ddtrace.internal.threads.PeriodicThreadA fork-safe periodic thread.
class
ddtrace.internal.uds.UDSHTTPConnectionAn HTTP connection established over a Unix Domain Socket.
func
ddtrace.internal.utils.cache.callonce(f:Callable[[], Any]) -> Callable[[], Any]Decorator for executing a function only the first time.
func
ddtrace.internal.utils.formats.asbool(value:Union[str, bool, None]) -> boolConvert the given String to a boolean object.
func
ddtrace.internal.utils.formats.format_trace_id(trace_id:int) -> strTranslate a trace ID to a string format supported by the backend.
class
ddtrace.internal.utils.http.MediaTypeBody-parsing category for an HTTP ``Content-Type``.
func
ddtrace.internal.utils.http.connector(url:str, **kwargs:Any) -> ConnectorCreate a connector context manager for the given URL.
func
ddtrace.internal.utils.http.get_connection(url:str, timeout:float=DEFAULT_TIMEOUT) -> ConnectionTypeReturn an HTTP connection to the given URL.
func
ddtrace.internal.utils.http.parse_form_params(body:str) -> dict[str, Union[str, list[str]]]Return a dict of form data after HTTP form parsing
func
ddtrace.internal.utils.http.strip_query_string(url:str) -> strStrips the query string from a URL for use as tag in spans.
func
ddtrace.internal.utils.importlib.func_name(f:Callable[..., Any]) -> strReturn a human readable version of the function's name.
func
ddtrace.internal.utils.importlib.module_name(instance:Any) -> strReturn the instance module name.
func
ddtrace.internal.utils.inspection.clear()Clear the inspection state.
class
ddtrace.internal.utils.time.HourGlassAn implementation of an hourglass.
method
ddtrace.internal.utils.time.HourGlass.trickling() -> boolCheck if sand is still trickling.
method
ddtrace.internal.utils.time.HourGlass.turn() -> NoneTurn the hourglass.
class
ddtrace.internal.utils.time.StopWatchA simple timer/stopwatch helper class.
method
ddtrace.internal.utils.time.StopWatch.elapsed() -> floatGet how many seconds have elapsed.
method
ddtrace.internal.utils.time.StopWatch.start() -> 'StopWatch'Starts the watch.
method
ddtrace.internal.utils.time.StopWatch.stop() -> 'StopWatch'Stops the watch.
func
ddtrace.internal.uwsgi.check_uwsgi(worker_callback:Optional[Callable]=None, atexit:Optional[Callable]=None) -> NoneCheck whetever uwsgi is running and what needs to be done.
class
ddtrace.internal.uwsgi.uWSGIConfigDeprecationWarninguWSGI configuration deprecation warning.
class
ddtrace.internal.uwsgi.uWSGIConfigErroruWSGI configuration error.
class
ddtrace.internal.uwsgi.uWSGIMasterProcessThe process is uWSGI master process.
class
ddtrace.internal.wrapping.WrappedFunctionA wrapped function.
class
ddtrace.internal.wrapping.context.ContextWrappedFunctionA wrapped function.
func
ddtrace.internal.wrapping.generate_posargs(code:CodeType) -> Iterator[Any]Generate the opcodes for building the positional arguments tuple.
func
ddtrace.internal.wrapping.is_wrapped(f:FunctionType) -> boolCheck if a function is wrapped with any wrapper.
func
ddtrace.internal.wrapping.is_wrapped_with(f:FunctionType, wrapper:Wrapper) -> boolCheck if a function is wrapped with a specific wrapper.
func
ddtrace.internal.wrapping.unwrap(wf:WrappedFunction, wrapper:Wrapper) -> FunctionTypeUnwrap a wrapped function.
func
ddtrace.internal.wrapping.wrap(f:FunctionType, wrapper:Wrapper) -> WrappedFunctionWrap a function with a wrapper.
func
ddtrace.internal.wrapping.wrap_bytecode(wrapper:Wrapper, wrapped:FunctionType) -> bc.BytecodeWrap a function with a wrapper function.
class
ddtrace.internal.writer.writer.AgentlessTraceWriterHTTP writer for agentless JSON span intake.
class
ddtrace.internal.writer.writer.HTTPWriterWriter to an arbitrary HTTP intake endpoint.
class
ddtrace.internal.writer.writer_client.AgentlessWriterClientClient for the agentless span intake (api/v2/spans).
class
ddtrace.llmobs._constants.LLMOBS_STRUCTNested LLMObs struct keys in span._meta_struct.
class
ddtrace.llmobs._constants.LLMObsExportModeThe primary path LLMObs span data takes to Datadog.
class
ddtrace.llmobs._evaluators.format.JSONEvaluatorEvaluator that validates if output is valid JSON.
method
ddtrace.llmobs._evaluators.format.JSONEvaluator.evaluate(context:EvaluatorContext) -> EvaluatorResultPerform JSON validation.
class
ddtrace.llmobs._evaluators.format.LengthEvaluatorEvaluator that validates output length constraints.
method
ddtrace.llmobs._evaluators.format.LengthEvaluator.evaluate(context:EvaluatorContext) -> EvaluatorResultPerform length validation.
class
ddtrace.llmobs._evaluators.llm_judge.BaseStructuredOutputAbstract base class for LLM Judge structured outputs.
method
ddtrace.llmobs._evaluators.llm_judge.BaseStructuredOutput.label() -> strReturn the label key for the evaluation result.
method
ddtrace.llmobs._evaluators.semantic.SemanticSimilarityEvaluator.evaluate(context:EvaluatorContext) -> EvaluatorResultPerform semantic similarity evaluation.
class
ddtrace.llmobs._evaluators.string_matching.RegexMatchEvaluatorEvaluator that performs regex pattern matching.
method
ddtrace.llmobs._evaluators.string_matching.RegexMatchEvaluator.evaluate(context:EvaluatorContext) -> EvaluatorResultPerform regex match evaluation.
class
ddtrace.llmobs._experiment.BaseAsyncEvaluatorBase class for async row-level evaluators.
method
ddtrace.llmobs._experiment.BaseAsyncEvaluator.evaluate(context:EvaluatorContext) -> Union[JSONType, EvaluatorResult, MultiEvaluatorResult]Perform async evaluation.
class
ddtrace.llmobs._experiment.BaseEvaluatorThis class provides a unified interface for evaluators.
method
ddtrace.llmobs._experiment.BaseEvaluator.evaluate(context:EvaluatorContext) -> Union[JSONType, EvaluatorResult, 'MultiEvaluatorResult']Perform evaluation.
method
ddtrace.llmobs._experiment.Dataset.add_tags(index:int, tags:list[str]) -> NoneAdd tags to an existing record.
About this data
These signatures were extracted from the public source of DataDog/dd-trace-py
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.