Skip to content

Commit

Permalink
fix: remove extra / in openai framework metric name (#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 committed Jan 9, 2024
1 parent 3e79cc7 commit 7f586c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/metrics/names.js
Expand Up @@ -165,7 +165,7 @@ const EXPRESS = {
}

const AI = {
TRACKING_PREFIX: 'Nodejs/ML/',
TRACKING_PREFIX: 'Nodejs/ML',
EMBEDDING: 'Llm/embedding',
COMPLETION: 'Llm/completion'
}
Expand Down
3 changes: 2 additions & 1 deletion test/versioned/openai/chat-completions.tap.js
Expand Up @@ -63,7 +63,8 @@ tap.test('OpenAI instrumentation - chat completions', (t) => {
messages: [{ role: 'user', content: 'You are a mathematician.' }]
})

const metrics = agent.metrics.getOrCreateMetric(`${OPENAI.TRACKING_PREFIX}/${pkgVersion}`)
console.log(OPENAI.TRACKING_PREFIX)
const metrics = agent.metrics.getOrCreateMetric(`Nodejs/ML/OpenAI/${pkgVersion}`)
t.equal(metrics.callCount > 0, true)

tx.end()
Expand Down

0 comments on commit 7f586c3

Please sign in to comment.