Repository navigation
fix(sdk): name why exports fail and stop experiments on a revoked key - #193
Merged
Merged
Conversation
A refused OTLP export now carries the reason the ingest gave, such as "This API key cannot send telemetry", in both SDKs. runExperiment and run_experiment stop starting items after a 401 for the key and base URL of the run, and the results line tells the experiment action when the runs sent no traces. Agent and tool spans in TypeScript take the span name as their agent or tool name, as in Python.
This was referenced Nov 3, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A refused export now says why. With a key that has Run experiments but not Send telemetry, the first failed trace export used to report only
telemetry.dev trace ingest failed: 403(TypeScript) orOTLP span export failed (check the API key and ingest URL)(Python). Both SDKs now reporttelemetry.dev trace ingest failed: 403 This API key cannot send telemetry. Create a key with Send telemetry access., the message of the ingest's JSON or protobufStatus.IngestErrorwith the status. Another content type, or a body that can't be read, keeps the old message. Python gets the response from arequestssession hook on its OTLP exporters and raises the same message as anIngestError; an export with no response keeps the generic message.invalid_api_key. Before, a run whose project was deleted kept running every item and failed only at the end. A 403 does not stop the run, since the key still works for the experiment API.traced, false without an enabled client or after a 401 or 403 refusal, andtracesErrorwith the refusal. The job summary and comment then say the runs have no traces, with the ingest's reason, or with theinit()hint when there was no client. An outage (5xx, timeouts) does not count.type: "agent"ortype: "tool"span withoutagentNameortoolNamenow takes its span name, as Python already did. In both SDKs a span named after its operation (invoke_agent,invoke_agent AGENT123,execute_tool) gets no name, so the Bedrock agent spans keep none.traceIda score belongs to that trace's session, and that a session's trace keeps the environment of its first turn. The action README anddocs/sdk-conformance.mdmatch.Python now lists
requests>=2.28andgoogleapis-common-protos>=1.63.1as direct dependencies. The OTLP exporter already required both, with floors that do not import on Python 3.10 (requests 2.7) or with protobuf 5 (googleapis-common-protos before 1.63.1). Because the SDK passes its own session to the exporters, the exporters no longer read the OpenTelemetry credential provider variables; that is #192.Tests run:
vp test runinpackages/otel(102 passed),packages/sdk(320),packages/bedrock(88),packages/eve(50),packages/ai(98),packages/opencode(24),packages/omp(20) andpackages/pi(24).vp check: one type error inpackages/omp/tests/omp.test.tsand one lint warning inpackages/sdk/tests/capture.test.ts, both also on main in my local setup.py:checkfor the 7 Python packages,pytestinsdks/python(474 passed), and.github/scripts/python_dependency_bounds.shfor all 7 packages.Each new assertion fails when the code it covers is removed.