You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(openai): update metric names in docs [backport #5809 to 1.13] (#5817)
Backports #5809 to 1.13.
This PR fixes the openai patch docs to include the api_key span tag, as
well as adding a missing `openai.organization.` to the org name and org
id span tags.
## Checklist
- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] OPTIONAL: PR description includes explicit acknowledgement of the
performance implications of the change as reported in the benchmarks PR
comment.
## Reviewer Checklist
- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer has explicitly acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment.
Co-authored-by: Kyle Verhoog <[email protected]>
Copy file name to clipboardExpand all lines: ddtrace/contrib/openai/__init__.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,14 @@
3
3
traces, and logs (logs are disabled by default) for requests made to the
4
4
completions, chat completions, and embeddings endpoints.
5
5
6
-
All metrics, logs, and traces submitted from the OpenAI integration are tagged with:
6
+
All metrics, logs, and traces submitted from the OpenAI integration are tagged by:
7
7
8
8
- ``service``, ``env``, ``version``: see the `Unified Service Tagging docs <https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging>`_.
9
9
- ``endpoint``: OpenAI API endpoint used in the request.
10
10
- ``model``: OpenAI model used in the request.
11
-
- ``organization.name``: OpenAI organization name used in the request.
12
-
- ``organization.id``: OpenAI organization ID used in the request (when available).
11
+
- ``openai.organization.name``: OpenAI organization name used in the request.
12
+
- ``openai.organization.id``: OpenAI organization ID used in the request (when available).
13
+
- ``openai.api_key``: OpenAI API key used to make the request (obfuscated to match the OpenAI UI representation ``sk-...XXXX`` where ``XXXX`` is the last 4 digits of the key).
0 commit comments