Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 7 additions & 6 deletions js/src/auto-instrumentations/configs/ai-sdk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
import { aiSDKChannels } from "../../instrumentation/plugins/ai-sdk-channels";

/**
* Instrumentation configurations for the Vercel AI SDK.
Expand All @@ -14,7 +15,7 @@ import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
export const aiSDKConfigs: InstrumentationConfig[] = [
// generateText - async function
{
channelName: "generateText",
channelName: aiSDKChannels.generateText.channelName,
module: {
name: "ai",
versionRange: ">=3.0.0",
Expand All @@ -28,7 +29,7 @@ export const aiSDKConfigs: InstrumentationConfig[] = [

// streamText - async function
{
channelName: "streamText",
channelName: aiSDKChannels.streamText.channelName,
module: {
name: "ai",
versionRange: ">=3.0.0",
Expand All @@ -42,7 +43,7 @@ export const aiSDKConfigs: InstrumentationConfig[] = [

// generateObject - async function
{
channelName: "generateObject",
channelName: aiSDKChannels.generateObject.channelName,
module: {
name: "ai",
versionRange: ">=3.0.0",
Expand All @@ -56,7 +57,7 @@ export const aiSDKConfigs: InstrumentationConfig[] = [

// streamObject - async function
{
channelName: "streamObject",
channelName: aiSDKChannels.streamObject.channelName,
module: {
name: "ai",
versionRange: ">=3.0.0",
Expand All @@ -70,7 +71,7 @@ export const aiSDKConfigs: InstrumentationConfig[] = [

// Agent.generate - async method (v3-v5 only, Agent structure changed in v6)
{
channelName: "Agent.generate",
channelName: aiSDKChannels.agentGenerate.channelName,
module: {
name: "ai",
versionRange: ">=3.0.0 <6.0.0",
Expand All @@ -85,7 +86,7 @@ export const aiSDKConfigs: InstrumentationConfig[] = [

// Agent.stream - async method (v3-v5 only, Agent structure changed in v6)
{
channelName: "Agent.stream",
channelName: aiSDKChannels.agentStream.channelName,
module: {
name: "ai",
versionRange: ">=3.0.0 <6.0.0",
Expand Down
5 changes: 3 additions & 2 deletions js/src/auto-instrumentations/configs/anthropic.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
import { anthropicChannels } from "../../instrumentation/plugins/anthropic-channels";

/**
* Instrumentation configurations for the Anthropic SDK.
Expand All @@ -14,7 +15,7 @@ import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
export const anthropicConfigs: InstrumentationConfig[] = [
// Messages API - create (supports streaming via stream=true parameter)
{
channelName: "messages.create",
channelName: anthropicChannels.messagesCreate.channelName,
module: {
name: "@anthropic-ai/sdk",
versionRange: ">=0.60.0",
Expand All @@ -29,7 +30,7 @@ export const anthropicConfigs: InstrumentationConfig[] = [

// Beta Messages API - create (supports streaming via stream=true parameter)
{
channelName: "beta.messages.create",
channelName: anthropicChannels.betaMessagesCreate.channelName,
module: {
name: "@anthropic-ai/sdk",
versionRange: ">=0.60.0",
Expand Down
3 changes: 2 additions & 1 deletion js/src/auto-instrumentations/configs/claude-agent-sdk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
import { claudeAgentSDKChannels } from "../../instrumentation/plugins/claude-agent-sdk-channels";

/**
* Instrumentation configuration for the Claude Agent SDK.
Expand All @@ -14,7 +15,7 @@ import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
export const claudeAgentSDKConfigs: InstrumentationConfig[] = [
// query - Main entry point for agent interactions (top-level exported async generator function)
{
channelName: "query",
channelName: claudeAgentSDKChannels.query.channelName,
module: {
name: "@anthropic-ai/claude-agent-sdk",
versionRange: ">=0.1.0",
Expand Down
5 changes: 3 additions & 2 deletions js/src/auto-instrumentations/configs/google-genai.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
import { googleGenAIChannels } from "../../instrumentation/plugins/google-genai-channels";

/**
* Instrumentation configurations for the Google GenAI SDK.
Expand All @@ -15,7 +16,7 @@ export const googleGenAIConfigs: InstrumentationConfig[] = [
// Models.generateContentInternal - The actual class method (Node.js entry point)
// Note: generateContent is an arrow function property that calls this internal method
{
channelName: "models.generateContent",
channelName: googleGenAIChannels.generateContent.channelName,
module: {
name: "@google/genai",
versionRange: ">=1.0.0",
Expand All @@ -31,7 +32,7 @@ export const googleGenAIConfigs: InstrumentationConfig[] = [
// Models.generateContentStreamInternal - The actual class method (Node.js entry point)
// Note: generateContentStream is an arrow function property that calls this internal method
{
channelName: "models.generateContentStream",
channelName: googleGenAIChannels.generateContentStream.channelName,
module: {
name: "@google/genai",
versionRange: ">=1.0.0",
Expand Down
18 changes: 9 additions & 9 deletions js/src/auto-instrumentations/configs/openai.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { InstrumentationConfig } from "@apm-js-collab/code-transformer";
import { OPENAI_CHANNEL_SUFFIX } from "../../instrumentation/plugins/channels";
import { openAIChannels } from "../../instrumentation/plugins/openai-channels";

/**
* Instrumentation configurations for the OpenAI SDK.
Expand All @@ -15,7 +15,7 @@ import { OPENAI_CHANNEL_SUFFIX } from "../../instrumentation/plugins/channels";
export const openaiConfigs: InstrumentationConfig[] = [
// Chat Completions
{
channelName: OPENAI_CHANNEL_SUFFIX.CHAT_COMPLETIONS_CREATE,
channelName: openAIChannels.chatCompletionsCreate.channelName,
module: {
name: "openai",
versionRange: ">=4.0.0",
Expand All @@ -30,7 +30,7 @@ export const openaiConfigs: InstrumentationConfig[] = [

// Embeddings
{
channelName: OPENAI_CHANNEL_SUFFIX.EMBEDDINGS_CREATE,
channelName: openAIChannels.embeddingsCreate.channelName,
module: {
name: "openai",
versionRange: ">=4.0.0",
Expand All @@ -45,7 +45,7 @@ export const openaiConfigs: InstrumentationConfig[] = [

// Beta Chat Completions Parse
{
channelName: OPENAI_CHANNEL_SUFFIX.BETA_CHAT_COMPLETIONS_PARSE,
channelName: openAIChannels.betaChatCompletionsParse.channelName,
module: {
name: "openai",
versionRange: ">=4.0.0",
Expand All @@ -60,7 +60,7 @@ export const openaiConfigs: InstrumentationConfig[] = [

// Moderations
{
channelName: OPENAI_CHANNEL_SUFFIX.MODERATIONS_CREATE,
channelName: openAIChannels.moderationsCreate.channelName,
module: {
name: "openai",
versionRange: ">=4.0.0",
Expand All @@ -75,7 +75,7 @@ export const openaiConfigs: InstrumentationConfig[] = [

// Beta Chat Completions Stream
{
channelName: OPENAI_CHANNEL_SUFFIX.BETA_CHAT_COMPLETIONS_STREAM,
channelName: openAIChannels.betaChatCompletionsStream.channelName,
module: {
name: "openai",
versionRange: ">=4.0.0",
Expand All @@ -90,7 +90,7 @@ export const openaiConfigs: InstrumentationConfig[] = [

// Responses API (v4.87.0+)
{
channelName: OPENAI_CHANNEL_SUFFIX.RESPONSES_CREATE,
channelName: openAIChannels.responsesCreate.channelName,
module: {
name: "openai",
versionRange: ">=4.87.0",
Expand All @@ -104,7 +104,7 @@ export const openaiConfigs: InstrumentationConfig[] = [
},

{
channelName: OPENAI_CHANNEL_SUFFIX.RESPONSES_STREAM,
channelName: openAIChannels.responsesStream.channelName,
module: {
name: "openai",
versionRange: ">=4.87.0",
Expand All @@ -118,7 +118,7 @@ export const openaiConfigs: InstrumentationConfig[] = [
},

{
channelName: OPENAI_CHANNEL_SUFFIX.RESPONSES_PARSE,
channelName: openAIChannels.responsesParse.channelName,
module: {
name: "openai",
versionRange: ">=4.87.0",
Expand Down
Loading
Loading