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
- Drag the
DatadogConnectorcomponent onto the canvas from the Component Library. - Click on the component to open the configuration panel.
- On the General tab, set
nameto identify this tracing component in Datadog. - Configure Datadog through environment variables or the standard
ddtracesetup:- Set
HAYSTACK_CONTENT_TRACING_ENABLEDto"true"to trace component inputs and outputs. - Configure Datadog with standard
ddtracemechanisms, such asDD_SERVICE,DD_ENV, andDD_VERSION, or run your application withddtrace-run. See the ddtrace documentation for details.
- Set
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
| Parameter | Type | Description |
|---|---|---|
name | str | The name of the tracing component. |
Init Parameters
These are the parameters you can configure in Pipeline Builder:
| Parameter | Type | Default | Description |
|---|---|---|---|
name | str | datadog | The name used to identify this tracing component in Datadog. |
Run Method Parameters
This component has no run() method parameters.
Related Information
Was this page helpful?