Repository navigation
SDK 0.4.0: one config format, server-span enrichment in every SDK, Node ESM/CJS - #27
Merged
Merged
Conversation
- Load the shared agenttel.yml format (agenttel: root, kebab-case keys, operations map keyed by METHOD /route with optional [brackets], latency as duration string or ms number); legacy dialects load with a warning - AgentTelMiddleware (pure ASGI) resolves the route template and sets baselines and decisions on the active server span; the processor no longer depends on the pre-routing span name - instrument_fastapi() attaches to an existing SDK TracerProvider instead of replacing it, merges topology into its resource, and instruments the app with FastAPIInstrumentor when available - Decision attributes use agenttel.decision.* and topology uses on_call_channel as in attributes.json; old constants kept as aliases - Fix ConsumptionPattern.ASYNC value, add EscalationLevel.AUTO_RESOLVE - Fix fastapi-example (BatchSpanProcessor, valid enum values) - Add real-uvicorn integration test and config dialect tests Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
- Build ESM with NodeNext so relative imports carry .js extensions
(fixes ERR_MODULE_NOT_FOUND for ./auth); mark dist/cjs as CommonJS;
types-first exports map; engines node >= 18
- Load the shared agenttel.yml format; the pre-0.4.0 flat/snake_case
dialect and operations list still load with a warning
- Express/Fastify middleware set decision attributes; accept { engine };
Express re-checks the matched route before the response ends, Fastify
records http.route
- Add AgentTelEngine.fromConfigFile, engine.operations,
engine.resourceAttributes(), parseConfig, normalizeOperationName,
parseDurationMs, enrichOperation
- Integration test: real Express and Fastify servers with OTel
instrumentation against the built package; test:pack installs the
packed tarball in a fresh project (ESM import, CJS require, servers)
- Examples register engine.spanProcessor and HTTP instrumentation
Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
- Builder.Build() registers static baselines and decision context from YAML operations (explicit values > profile > defaults) - Load the shared agenttel.yml format; the pre-0.4.0 flat camelCase dialect still loads with a warning - New operations package (Registry, Decision, Normalize, ParseDurationMs) and enrich package shared by the processor and middleware - net/http, Gin and gRPC middleware set decision attributes and accept WithEngine(engine); net/http records http.route from Go 1.22+ ServeMux patterns and matches parameterized routes after routing - Engine.Resource()/ResourceAttributes() put topology on the resource - Fix go-service-example and gin-example to compile and run against the real API with otelhttp/otelgin - Integration test: httptest server with otelhttp + AgentTel middleware Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
- Maven 0.4.0-alpha, npm 0.4.0-alpha.0, PyPI 0.4.0a1 - CHANGELOG entry for 0.4.0-alpha - README and quick-start: real Go/Node/Python setup code, correct minimum versions (Go 1.24, otel/sdk 1.39.0) Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
Server spans from the OTel javaagent start with a provisional name
("POST") and get their route later, so AgentTelSpanProcessor's onStart
lookup missed them and -javaagent runs exported no agenttel.* attributes.
- AgentTelEnrichingSpanExporter.withOperationMetadata(): add static
baselines and decisions at export time, resolved from the final span
name or METHOD http.route, when the span did not get them at start
- Javaagent: enable it, strip [brackets] from operation keys, and add
topology via a resource customizer (independent of SPI discovery)
- Project version comes from VERSION_NAME (jar names said 0.2.0-alpha)
- JavaagentIntegrationTest: plain Spring Boot app run with the built
agent jar, one request, assert server span and resource
Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
- node-test ran vitest without building, so the integration test (which loads dist/ under plain node) found no package; use npm test (pretest builds) and add the packed-tarball smoke test - Newer ruff releases enable more rule families by default (main itself now fails with 84 findings); select E4/E7/E9/F explicitly and pin ruff Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
rrohitramsen
force-pushed
the
release-0.4.0
branch
from
October 20, 2026 11:16
fcce470 to
cff9a85
Compare
The Python SDK now passes scripts/validate-attributes.sh. It was missing 127 canonical keys and defined 121 non-canonical ones. - Add the missing canonical constants with the Go/Node names (AGENTIC_*, CAUSE_*, SEVERITY_*, CORRELATION_*, CIRCUIT_BREAKER_*, ...). - Agentic tracer, scopes, orchestrations and guardrail recorder emit agenttel.agentic.* instead of top-level agent/step/task/... keys. GenAI reasoning/cached token counts use agenttel.genai.* keys. - Old constant names stay as deprecated aliases of the canonical keys. Never-emitted constants with no canonical equivalent are removed. - Keys still emitted that attributes.json lacks move to agenttel.extension_attributes. - Stop emitting duration_ms attributes that duplicate span duration; the invocation error message goes into the span status. - Fix AgentInvocation: exiting `with tracer.invoke()` raised "generator didn't stop", complete() left status "running", and fail() did not mark the invocation failed. Listed under Breaking in the 0.4.0-alpha CHANGELOG entry. Signed-off-by: Rohit Kumar <rrohit.ramsen@gmail.com>
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.
Fixes the SDK setup problems found by verifying the documented setups against the published 0.3.x packages: only Spring Boot worked as documented. After this PR, every SDK reads the same
agenttel.ymland puts topology, baselines and decision attributes on HTTP server spans.What changed
One config format, shared by all SDKs. Python, Node and Go now read the Spring Boot format:
agenttel:root and kebab-case keysoperationsas a map keyed by"METHOD /route";"[POST /x]"andPOST /xare the same key, and:idmatches{id}"45ms", or a plain number of millisecondsprofilesfor shared decision defaultsEach SDK's old format still loads and logs a deprecation warning.
Python
instrument_fastapi()reuses the app's existingTracerProviderinstead of replacing it, adds topology to its resource, and instruments the app.attributes.jsonnames:agenttel.decision.*(previouslyagenttel.operation.*) andtopology.on_call_channel(previouslyoncall_channel). The old constant names remain as aliases.Node
.jsextensions (built with NodeNext), anddist/cjsis marked as CommonJS.{ engine }sets topology, baselines and decisions in one go.AgentTelEngine.fromConfigFile()andengine.resourceAttributes().Go
operationsnow become static baselines and decisions inBuild().WithEngine(engine)for the net/http, Gin and gRPC middleware.http.routefrom Go 1.22+ServeMuxpatterns.engine.Resource().go-service-exampleandgin-examplecompile and run against the real API.otel/sdk1.39.0.JVM javaagent
agenttel.*attributes, because the span is namedPOSTuntil routing finishes.version = "0.2.0-alpha". Maven coordinates were already correct; only jar names and javadoc titles were wrong.Release prep
0.4.0-alpha, npm0.4.0-alpha.0, PyPI0.4.0a1.Testing
Each SDK has a new real-server integration test, like the Spring Boot
EnrichmentTest: send one request, then assert topology,agenttel.baseline.latency_p50_ms=45andagenttel.decision.retryableon the server span.node.otelhttpwithhttptest.-javaagent:<built jar>.Test suites:
Install checks in fresh Docker containers:
npm run test:pack).Not included
^1.25.0.agenttel-go/v0.4.0-alphaexists locally but is not pushed. Push it when releasing.