Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

DatadogConnector

Collect traces from your pipeline and send them to Datadog. Use this component to trace operations and data flow within pipeline components.

Key Features

  • Sends pipeline traces to Datadog for monitoring and analysis.
  • No connections to other pipeline components required — add it to your pipeline and it traces all operations automatically.
  • Configurable component name to identify traces in Datadog.
  • Supports tracing component inputs and outputs when content tracing is enabled.

Configuration

  1. Drag the DatadogConnector component onto the canvas from the Component Library.
  2. Click on the component to open the configuration panel.
  3. On the General tab, set name to identify this tracing component in Datadog.
  4. Configure Datadog through environment variables or the standard ddtrace setup:
    • Set HAYSTACK_CONTENT_TRACING_ENABLED to "true" to trace component inputs and outputs.
    • Configure Datadog with standard ddtrace mechanisms, such as DD_SERVICE, DD_ENV, and DD_VERSION, or run your application with ddtrace-run. See the ddtrace documentation for details.

Connections

DatadogConnector doesn't connect to any other component. Add it to your pipeline without connecting it to other components. It outputs a name value that identifies the tracing component.

Source Code

To check this component's source code, open datadog_connector.py in the Haystack Core Integrations repository.

Usage Examples

Basic Configuration

  DatadogConnector:
type: haystack_integrations.components.connectors.datadog.datadog_connector.DatadogConnector
init_parameters:
name: datadog

Add DatadogConnector to your pipeline without connecting it to other components. It automatically traces all pipeline operations when tracing is enabled:

# haystack-pipeline
components:
prompt_builder:
type: haystack.components.builders.prompt_builder.PromptBuilder
init_parameters:
template: "Answer this question: {{ question }}"

llm:
type: haystack.components.generators.openai.OpenAIGenerator
init_parameters:
api_key: {"type": "env_var", "env_vars": ["OPENAI_API_KEY"], "strict": false}
model: gpt-4o

DatadogConnector:
type: haystack_integrations.components.connectors.datadog.datadog_connector.DatadogConnector
init_parameters:
name: rag-chat

connections:
- sender: prompt_builder.prompt
receiver: llm.prompt

inputs:
query:
- prompt_builder.question

outputs:
answers: llm.replies

Parameters

Inputs

This component takes no inputs.

Outputs

ParameterTypeDescription
namestrThe name of the tracing component.

Init Parameters

These are the parameters you can configure in Pipeline Builder:

ParameterTypeDefaultDescription
namestrdatadogThe name used to identify this tracing component in Datadog.

Run Method Parameters

This component has no run() method parameters.