Skip to content

chore(opentelemetry-node): switch to upstream instrumentation-openai#1015

Merged
trentm merged 7 commits intomainfrom
trentm-swap-instr-openai
Sep 12, 2025
Merged

chore(opentelemetry-node): switch to upstream instrumentation-openai#1015
trentm merged 7 commits intomainfrom
trentm-swap-instr-openai

Conversation

@trentm
Copy link
Member

@trentm trentm commented Sep 9, 2025

This swaps out '@elastic/opentelemetry-instrumentation-openai' for
'@opentelemetry/instrumentation-openai' now that it has been upstreamed.
The only visible changes to the user should be:

  • the upstream instrumentation-openai has some slight improvements (made during the upstreaming), including adding support for instrumenting openai@5
  • the 'openai' string can now be used in OTEL_NODE_DISABLED_INSTRUMENTATIONS et al
    (the usage of the old '@elastic/opentelemetry-instrumentation-openai' will be supported, with a log warning, until the next major)

Closes: #963
Refs: elastic/opentelemetry#450 (docs update)

This swaps out '@elastic/opentelemetry-instrumentation-openai' for
'@opentelemetry/instrumentation-openai' now that it has been upstreamed.
The only visible changes to the user should be:
- the upstream instrumentation-openai has some slight improvements (made during the upstreaming), including adding support for instrumenting openai@5
- the 'openai' string can now be used in OTEL_NODE_DISABLED_INSTRUMENTATIONS et al
  (the usage of the old '@elastic/opentelemetry-instrumentation-openai' will be supported, with a log warning, until the next major)

Closes: #963
@trentm trentm self-assigned this Sep 9, 2025
@trentm
Copy link
Member Author

trentm commented Sep 10, 2025

  • the usage of the old '@elastic/opentelemetry-instrumentation-openai' will be supported, with a log warning, until the next major

That looks like this:

% OTEL_NODE_DISABLED_INSTRUMENTATIONS=@elastic/opentelemetry-instrumentation-openai node --env-file ./test/test-services.env -r @elastic/opentelemetry-node test/fixtures/use-openai.js | pino-pretty
...
[14:09:56.739] WARN (elastic-otel-node): using "@elastic/opentelemetry-instrumentation-openai" in environment variable "OTEL_NODE_DISABLED_INSTRUMENTATIONS" is deprecated, use "openai"
...

Embeddings:
{
  object: 'list',
  data: [
    {
      object: 'embedding',
      embedding: [
           0.018015357,   -0.024581904,    0.02112887,     0.0360627,
          -0.035175975,   0.0065981457,   0.054628868, -0.0097577935,
...
@trentm trentm marked this pull request as ready for review September 10, 2025 21:22
@trentm trentm requested review from a team as code owners September 10, 2025 21:22
@github-actions
Copy link

github-actions bot commented Sep 10, 2025

🔍 Preview links for changed docs

trentm added a commit to elastic/opentelemetry that referenced this pull request Sep 10, 2025
…streamed package

Elastic built instrumentation for openai and included it in EDOT Node.js.
Fairly recently that instrumentation was upstreamed to the OpenTelemetry project
and released under their namespace. EDOT Node.js 1.4.0 will swap over to the
upstreamed package name.

Refs: elastic/elastic-otel-node#1015
@trentm trentm requested a review from david-luna September 12, 2025 17:24
@trentm trentm merged commit 5163b1e into main Sep 12, 2025
14 checks passed
@trentm trentm deleted the trentm-swap-instr-openai branch September 12, 2025 22:25
trentm added a commit to elastic/opentelemetry that referenced this pull request Sep 12, 2025
…streamed package (#450)

Elastic built instrumentation for openai and included it in EDOT Node.js.
Fairly recently that instrumentation was upstreamed to the OpenTelemetry project
and released under their namespace. EDOT Node.js 1.4.0 will swap over to the
upstreamed package name.

Refs: elastic/elastic-otel-node#1015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants