Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updated api doc links for Node.js AIM #16739

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/content/docs/ai-monitoring/customize-agent-ai-monitoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metaDescription: 'You can apply certain configurations to your APM agents to cha
freshnessValidatedDate: never
---

Once you [install AI monitoring](/install/ai-monitoring), you can configure the default behavior of the agent or update your app to collect different kinds of data.
Once you [install AI monitoring](/install/ai-monitoring), you can configure the default behavior of the agent or update your app to collect different kinds of data.

## Configure the agent [#configure-agents]

Update default agent behavior for AI monitoring at these agent configuration docs:
Update default agent behavior for AI monitoring at these agent configuration docs:

<CollapserGroup>
<Collapser
Expand All @@ -18,7 +18,7 @@ Update default agent behavior for AI monitoring at these agent configuration doc
* [`ai_monitoring.enabled`](/docs/apm/agents/go-agent/configuration/go-agent-configuration/#ai-monitoring-enabled)
* [`ai_monitoring.streaming.enabled`](/docs/apm/agents/go-agent/configuration/go-agent-configuration/#ai-monitoring-streaming)
* [`ai_monitoring.record_content.enabled`](/docs/apm/agents/go-agent/configuration/go-agent-configuration/#ai-monitoring-record-content)
* [`ConfigCustomInsightsEventsMaxSamplesStored`](/docs/apm/agents/go-agent/configuration/go-agent-configuration/#env-var-table)
* [`ConfigCustomInsightsEventsMaxSamplesStored`](/docs/apm/agents/go-agent/configuration/go-agent-configuration/#env-var-table)
</Collapser>
<Collapser
id="nodejs-config"
Expand All @@ -28,7 +28,7 @@ Update default agent behavior for AI monitoring at these agent configuration doc
* [`ai_monitoring.streaming.enabled`](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#ai-monitoring-streaming)
* [`ai_monitoring.record_content.enabled`](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#ai-monitoring-record-content)
* [`custom_insights_events.max_samples_stored`](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#custom_events_max_samples_stored)
* [`span_events.max_samples_stored`](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#span-events-max-samples-stored)
* [`span_events.max_samples_stored`](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#span-events-max-samples-stored)
</Collapser>
<Collapser
id="python-config"
Expand All @@ -38,7 +38,7 @@ Update default agent behavior for AI monitoring at these agent configuration doc
* [`ai_monitoring.streaming.enabled`](/docs/apm/agents/python-agent/configuration/python-agent-configuration/#ai-monitoring-streaming)
* [`ai_monitoring.record_content.enabled`](/docs/apm/agents/python-agent/configuration/python-agent-configuration/#ai-monitoring-record-content)
* [`event_harvest_config.harvest_limits.span_event_data`](/docs/apm/agents/python-agent/configuration/python-agent-configuration/#harvest-limits-span-event-data)
* [`event_harvest_config.harvest_limits.custom_event_data`](/docs/apm/agents/python-agent/configuration/python-agent-configuration/#harvest-limits-custom-event-data)
* [`event_harvest_config.harvest_limits.custom_event_data`](/docs/apm/agents/python-agent/configuration/python-agent-configuration/#harvest-limits-custom-event-data)
</Collapser>
<Collapser
id="ruby-config"
Expand Down Expand Up @@ -74,55 +74,55 @@ Refer to the docs below for examples to set up counting tokens locally:
id="nodejs-token-method"
title="Node.js token count method"
>
Refer to our API docs for [`recordLlmFeedbackEvent`](https://newrelic.github.io/node-newrelic/API.html#recordLlmFeedbackEvent)
Refer to our API docs for:

* [`setLlmTokenCountCallback`](https://newrelic.github.io/node-newrelic/API.html#setLlmTokenCountCallback)
* [`getTraceMetadata`](https://newrelic.github.io/node-newrelic/API.html#getTraceMetadata)
</Collapser>
<Collapser
id="python-token-method"
title="Python token count method"
>
Refer to our API docs for [`set_llm_token_count_callback`](/docs/apm/agents/python-agent/python-agent-api/setllmtokencountcallback-python-agent-api).
Refer to our API docs for [`set_llm_token_count_callback`](/docs/apm/agents/python-agent/python-agent-api/setllmtokencountcallback-python-agent-api).
</Collapser>
<Collapser
id="ruby-token-method"
title="Ruby token count method"
>
Refer to our API docs for [`NewRelic::Agent.set_llm_token_count_callback`](/docs/apm/agents/ruby-agent/api-guides/ruby-ai-monitoring-apis).
Refer to our API docs for [`NewRelic::Agent.set_llm_token_count_callback`](/docs/apm/agents/ruby-agent/api-guides/ruby-ai-monitoring-apis).
</Collapser>
</CollapserGroup>

## User feedback methods [#enable-feedback]

If end users can leave feedback on an AI response, you can forward this data into the AI monitoring response table. To do this, you'll update your app code to correlate trace IDs from AI event data using callback methods.
If end users can leave feedback on an AI response, you can forward this data into the AI monitoring response table. To do this, you'll update your app code to correlate trace IDs from AI event data using callback methods.

There are two methods you need to implement to forward this kind of information:
There are two methods you need to implement to forward this kind of information:

<CollapserGroup>
<Collapser
id="go-feedback-methods"
title="Go feedback methods"
>

Refer to the Go API docs for:
Refer to the Go API docs for:

* [`GetTraceMetadata`](https://pkg.go.dev/github.com/newrelic/go-agent/v3/newrelic#Application.getTraceMetadata)
* [`RecordLLMFeedbackEvent`](https://pkg.go.dev/github.com/newrelic/go-agent/v3/newrelic#Application.RecordLLMFeedbackEvent)

</Collapser>
<Collapser
id="nodejs-feedback-methods"
title="Node.js feedback methods"
>
Refer to our API docs for [`recordLlmFeedbackEvent`](https://newrelic.github.io/node-newrelic/API.html#recordLlmFeedbackEvent)

Refer to our API docs for:

* [`setLlmTokenCountCallback`](https://newrelic.github.io/node-newrelic/API.html#setLlmTokenCountCallback)
* [`getTraceMetadata`](https://newrelic.github.io/node-newrelic/API.html#getTraceMetadata)
</Collapser>
<Collapser
id="python-feedback-methods"
title="Python feedback methods"
>

Refer to our API docs for:

* [`newrelic.agent.current_trace_id()`](/docs/apm/agents/python-agent/python-agent-api/currenttraceid-python-agent)
Expand All @@ -132,7 +132,7 @@ There are two methods you need to implement to forward this kind of information:
id="ruby-feedback-methods"
title="Ruby feedback methods"
>

Refer to our API docs for [`NewRelic::Agent.record_llm_feedback_event`](/docs/apm/agents/ruby-agent/api-guides/ruby-ai-monitoring-apis/#user-feedback)
</Collapser>
</CollapserGroup>
</CollapserGroup>
Loading