Repository navigation
Add Node.js experiment setup instructions - #39963
mehulsonowal wants to merge 5 commits into
Conversation
|
Created DOCS-15714 for the editorial review. |
domalessi
left a comment
There was a problem hiding this comment.
Left some feedback! Let me know when this is ready for another look.
domalessi
left a comment
There was a problem hiding this comment.
A bit more tweaking and then we should be good to go!
|
|
||
| {{< tabs >}} | ||
| {{% tab "Python" %}} | ||
| Supply both a Datadog API key and application key. Pass `api_key` and `app_key` to `LLMObs.enable()`, or set the `DD_API_KEY` and `DD_APP_KEY` environment variables: |
There was a problem hiding this comment.
| Supply both a Datadog API key and application key. Pass `api_key` and `app_key` to `LLMObs.enable()`, or set the `DD_API_KEY` and `DD_APP_KEY` environment variables: | |
| Pass `api_key` and `app_key` to `LLMObs.enable()`, or set the `DD_API_KEY` and `DD_APP_KEY` environment variables: |
| {{% /tab %}} | ||
|
|
||
| {{% tab "Node.js" %}} | ||
| Set `DD_API_KEY` and `DD_APP_KEY` in your environment, then initialize `dd-trace` in your application entrypoint. The Experiments client uses these environment variables for authentication: |
There was a problem hiding this comment.
| Set `DD_API_KEY` and `DD_APP_KEY` in your environment, then initialize `dd-trace` in your application entrypoint. The Experiments client uses these environment variables for authentication: | |
| Set `DD_API_KEY` and `DD_APP_KEY` in your environment. The Experiments client uses these variables for authentication. Then choose one of the following initialization methods. | |
| **In-code initialization** | |
| Initialize `dd-trace` in your application entrypoint: |
| - `projectName` identifies the project that contains your datasets and experiments. If omitted, it defaults to `default-project`. | ||
| - `mlApp` identifies the LLM application used for Agent Observability traces. Neither `mlApp` nor `service` determines the Experiments project name. | ||
|
|
||
| For command-line setup, include both your API key and application key: |
There was a problem hiding this comment.
| For command-line setup, include both your API key and application key: | |
| **Command-line initialization** | |
| Alternatively, initialize `dd-trace` from the command line instead of calling `require('dd-trace').init(...)` in your application. Set the configuration and authentication environment variables when starting your application: |
|
|
||
| {{< tabs >}} | ||
| {{% tab "Python" %}} | ||
| Set `agentless_enabled` to `False` (the default) to enable APM trace correlation: |
There was a problem hiding this comment.
| Set `agentless_enabled` to `False` (the default) to enable APM trace correlation: | |
| APM trace correlation requires `agentless_enabled=False`, which is the default: |
| {{% /tab %}} | ||
|
|
||
| {{% tab "Node.js" %}} | ||
| Set `agentlessEnabled` to `false` (the default) to enable APM trace correlation: |
There was a problem hiding this comment.
| Set `agentlessEnabled` to `false` (the default) to enable APM trace correlation: | |
| APM trace correlation requires `agentlessEnabled: false`, which is the default. If you used the in-code initialization example in the setup section, change `agentlessEnabled` from `true` to `false`: |
|
|
||
| Datadog supports the following evaluator return types: | ||
|
|
||
| - **Boolean**: returns true or false |
There was a problem hiding this comment.
| - **Boolean**: returns true or false | |
| - **Boolean**: Returns true or false |
| For the class-based approach using `BaseSummaryEvaluator`, see the [Evaluation Developer Guide](/llm_observability/investigate/evaluations/evaluation_developer_guide). | ||
|
|
There was a problem hiding this comment.
Move this reference under the Class-based summary evaluators heading, as suggested there.
| For the class-based approach using `BaseSummaryEvaluator`, see the [Evaluation Developer Guide](/llm_observability/investigate/evaluations/evaluation_developer_guide). |
|
|
||
| Summary evaluator functions can take a list of any non-null type as `inputs` (string, number, Boolean, object, or array); `outputs` and `expected_outputs` can be lists of any type. `evaluators_results` is a dictionary of lists of results from evaluators, keyed by the name of the evaluator function. | ||
|
|
||
| #### Class-based summary evaluators |
There was a problem hiding this comment.
| #### Class-based summary evaluators | |
| #### Class-based summary evaluators | |
| For details on implementing `BaseSummaryEvaluator`, see the [Evaluation Developer Guide](/llm_observability/investigate/evaluations/evaluation_developer_guide/). |
|
|
||
| {{< tabs >}} | ||
| {{% tab "Python" %}} | ||
| For custom tracing, use the [Python tracing decorators](/llm_observability/instrument/custom_instrumentation?tab=decorators#trace-an-llm-application). For automatic instrumentation, see the [supported Python frameworks](/llm_observability/instrument/auto_instrumentation?tab=python). |
There was a problem hiding this comment.
The custom_instrumentation URL redirects to the SDK page, where the trace-an-llm-application anchor no longer exists. Use reference-style links with both definitions inside this Python tab.
| For custom tracing, use the [Python tracing decorators](/llm_observability/instrument/custom_instrumentation?tab=decorators#trace-an-llm-application). For automatic instrumentation, see the [supported Python frameworks](/llm_observability/instrument/auto_instrumentation?tab=python). | |
| For custom tracing, use the [Python tracing decorators][2]. For automatic instrumentation, see the [supported Python frameworks][3]. | |
| [2]: /llm_observability/instrument/sdk/?tab=python#manual-instrumentation | |
| [3]: /llm_observability/instrument/auto_instrumentation?tab=python |
|
|
||
| 1. Install the Agent Observability SDK: | ||
|
|
||
| {{< tabs >}} |
There was a problem hiding this comment.
Nest the setup tabs inside their numbered steps.
|
Superseded by #40594. The replacement PR contains the finalized documentation changes in a single GitHub-verified commit authored and signed as mehulsonowal. |
What does this PR do? What is the motivation?
Update the Agent Observability Experiments documentation to include Node.js instructions alongside Python and organize the setup content under Guides.
Merge readiness
Testing
git diff --checkAI assistance
Additional notes