Skip to content

Latest commit

 

History

History
219 lines (164 loc) · 15.7 KB

File metadata and controls

219 lines (164 loc) · 15.7 KB
graph LR
    Tracing_Core["Tracing Core"]
    Instrumentation_Configuration["Instrumentation & Configuration"]
    Application_Security_AppSec_IAST["Application Security (AppSec) & IAST"]
    LLM_Observability_LLMObs_["LLM Observability (LLMObs)"]
    CI_Visibility_CIVisibility_["CI Visibility (CIVisibility)"]
    Live_Debugging_Profiling["Live Debugging & Profiling"]
    Data_Streams_Error_Tracking["Data Streams & Error Tracking"]
    Internal_Event_Telemetry_System["Internal Event & Telemetry System"]
    Remote_Configuration["Remote Configuration"]
    Vendored_Libraries["Vendored Libraries"]
    Tracing_Core -- "processes spans for" --> Application_Security_AppSec_IAST
    Application_Security_AppSec_IAST -- "enriches spans in" --> Tracing_Core
    Tracing_Core -- "processes spans for" --> LLM_Observability_LLMObs_
    LLM_Observability_LLMObs_ -- "creates spans in" --> Tracing_Core
    Tracing_Core -- "processes spans for" --> CI_Visibility_CIVisibility_
    CI_Visibility_CIVisibility_ -- "manages spans in" --> Tracing_Core
    Tracing_Core -- "provides context to" --> Live_Debugging_Profiling
    Live_Debugging_Profiling -- "creates spans in" --> Tracing_Core
    Tracing_Core -- "uses spans from" --> Data_Streams_Error_Tracking
    Data_Streams_Error_Tracking -- "sets checkpoints on" --> Tracing_Core
    Tracing_Core -- "dispatches events to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "receives events from" --> Tracing_Core
    Tracing_Core -- "reads configuration from" --> Instrumentation_Configuration
    Instrumentation_Configuration -- "configures" --> Tracing_Core
    Application_Security_AppSec_IAST -- "registers handlers with" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "dispatches events to" --> Application_Security_AppSec_IAST
    Application_Security_AppSec_IAST -- "receives updates from" --> Remote_Configuration
    Remote_Configuration -- "updates rules for" --> Application_Security_AppSec_IAST
    Application_Security_AppSec_IAST -- "reports metrics to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "receives data from" --> Application_Security_AppSec_IAST
    LLM_Observability_LLMObs_ -- "dispatches events to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "notifies" --> LLM_Observability_LLMObs_
    LLM_Observability_LLMObs_ -- "reports metrics to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "receives data from" --> LLM_Observability_LLMObs_
    CI_Visibility_CIVisibility_ -- "registers handlers with" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "dispatches events to" --> CI_Visibility_CIVisibility_
    CI_Visibility_CIVisibility_ -- "reports metrics to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "receives data from" --> CI_Visibility_CIVisibility_
    Live_Debugging_Profiling -- "registers for events with" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "dispatches events to" --> Live_Debugging_Profiling
    Live_Debugging_Profiling -- "reports status to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "receives telemetry from" --> Live_Debugging_Profiling
    Live_Debugging_Profiling -- "receives configurations from" --> Remote_Configuration
    Remote_Configuration -- "provides configurations to" --> Live_Debugging_Profiling
    Live_Debugging_Profiling -- "performs instrumentation via" --> Instrumentation_Configuration
    Instrumentation_Configuration -- "provides instrumentation for" --> Live_Debugging_Profiling
    Data_Streams_Error_Tracking -- "listens for events from" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "dispatches events to" --> Data_Streams_Error_Tracking
    Data_Streams_Error_Tracking -- "reports metrics to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "receives telemetry from" --> Data_Streams_Error_Tracking
    Data_Streams_Error_Tracking -- "injects bytecode via" --> Instrumentation_Configuration
    Instrumentation_Configuration -- "provides bytecode injection for" --> Data_Streams_Error_Tracking
    Internal_Event_Telemetry_System -- "reports configuration to" --> Instrumentation_Configuration
    Instrumentation_Configuration -- "provides configuration for" --> Internal_Event_Telemetry_System
    Remote_Configuration -- "dispatches updates to" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "notifies" --> Remote_Configuration
    Remote_Configuration -- "triggers changes in" --> Instrumentation_Configuration
    Instrumentation_Configuration -- "provides patching for" --> Remote_Configuration
    Vendored_Libraries -- "uses" --> Internal_Event_Telemetry_System
    Internal_Event_Telemetry_System -- "provides metrics to" --> Vendored_Libraries
    Vendored_Libraries -- "uses" --> Application_Security_AppSec_IAST
    Application_Security_AppSec_IAST -- "provides functionality to" --> Vendored_Libraries
    click Tracing_Core href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Tracing Core.md" "Details"
    click Instrumentation_Configuration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Instrumentation & Configuration.md" "Details"
    click Application_Security_AppSec_IAST href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Application Security (AppSec) & IAST.md" "Details"
    click LLM_Observability_LLMObs_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/LLM Observability (LLMObs).md" "Details"
    click CI_Visibility_CIVisibility_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/CI Visibility (CIVisibility).md" "Details"
    click Live_Debugging_Profiling href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Live Debugging & Profiling.md" "Details"
    click Data_Streams_Error_Tracking href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Data Streams & Error Tracking.md" "Details"
    click Internal_Event_Telemetry_System href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Internal Event & Telemetry System.md" "Details"
    click Remote_Configuration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Remote Configuration.md" "Details"
    click Vendored_Libraries href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//dd-trace-py/Vendored Libraries.md" "Details"
Loading

CodeBoardingDemoContact

Component Details

The dd-trace-py project provides comprehensive observability for Python applications, primarily focusing on distributed tracing. Its main flow involves instrumenting application code to generate traces and spans, enriching them with various features like security, LLM monitoring, and CI visibility, and then sending this telemetry data to a Datadog agent. The system is highly modular, with a central tracing core supported by an internal event hub, configuration management, and dynamic instrumentation capabilities, allowing for flexible and extensible monitoring.

Tracing Core

The foundational component responsible for creating, managing, and finalizing distributed traces and spans, including context propagation, sampling, and writing to the agent.

Related Classes/Methods:

Instrumentation & Configuration

Manages the dynamic injection of tracing logic into application code and provides a centralized system for configuring the tracer's behavior and features.

Related Classes/Methods:

Application Security (AppSec) & IAST

Provides runtime application security features like Web Application Firewall (WAF) for threat detection and blocking, and Interactive Application Security Testing (IAST) for vulnerability identification, integrating with the tracing core.

Related Classes/Methods:

  • ddtrace.appsec._processor.AppSecSpanProcessor (76:371)
  • ddtrace.appsec._iast (full file reference)
  • ddtrace.appsec._asm_request_context (full file reference)
  • ddtrace.appsec._ddwaf.waf (full file reference)
  • ddtrace.appsec._metrics (full file reference)
  • ddtrace.appsec._trace_utils (full file reference)
  • ddtrace.appsec._remoteconfiguration (full file reference)

LLM Observability (LLMObs)

Offers specialized tracing and monitoring for interactions with Large Language Models, including input/output tracking, token usage, and evaluation metrics.

Related Classes/Methods:

  • ddtrace.llmobs._llmobs.LLMObs (full file reference)
  • ddtrace.llmobs._integrations (full file reference)
  • ddtrace.llmobs._writer (full file reference)
  • ddtrace.llmobs._evaluators (full file reference)

CI Visibility (CIVisibility)

Integrates with CI/CD pipelines to provide detailed insights into test execution, including test session, module, and suite tracking, code coverage, and intelligent test skipping.

Related Classes/Methods:

  • ddtrace.internal.ci_visibility.recorder.CIVisibility (full file reference)
  • ddtrace.contrib.internal.pytest (full file reference)
  • ddtrace.internal.ci_visibility.git_client (full file reference)
  • ddtrace.internal.ci_visibility.coverage (full file reference)

Live Debugging & Profiling

Provides capabilities for dynamic code instrumentation, capturing runtime data, logs, and metrics, and collects detailed performance profiles (e.g., CPU, memory) to identify bottlenecks.

Related Classes/Methods:

Data Streams & Error Tracking

Provides end-to-end visibility and latency tracking for data flowing through distributed messaging systems and captures and reports handled exceptions for error analysis.

Related Classes/Methods:

Internal Event & Telemetry System

A central publish-subscribe mechanism for internal communication and a system for collecting and reporting internal operational metrics, configurations, and errors of the tracer itself.

Related Classes/Methods:

Remote Configuration

Facilitates dynamic updates to the tracer's configuration from a remote source, enabling features like real-time AppSec rule updates or dynamic sampling adjustments.

Related Classes/Methods:

Vendored Libraries

Contains third-party Python libraries that are vendored directly into the dd-trace-py project to ensure compatibility, stability, and avoid external dependency conflicts.

Related Classes/Methods:

  • ddtrace.vendor.dogstatsd.base.DogStatsd (full file reference)
  • ddtrace.vendor.packaging.version (full file reference)
  • ddtrace.vendor.psutil (full file reference)