Modernize OTel semantic conventions, add diverse API endpoints, and fix trace ID uniqueness#112
Open
manojhosk wants to merge 3 commits intocisco-open:masterfrom
Open
Modernize OTel semantic conventions, add diverse API endpoints, and fix trace ID uniqueness#112manojhosk wants to merge 3 commits intocisco-open:masterfrom
manojhosk wants to merge 3 commits intocisco-open:masterfrom
Conversation
added 3 commits
March 10, 2026 15:28
…and add diverse API endpoints - Migrate all example definitions from deprecated OTel attribute names to current stable semantic conventions (http.method -> http.request.method, net.host.name -> server.address, db.system -> db.system.name, etc.) - Restructure demo trace with proper CLIENT + SERVER span pairs for each inter-service call, using url.full for client spans and url.path for server spans per OTel spec - Fix trace ID uniqueness bug in SpansGenerator where all copies within a payload shared the same trace/span IDs due to mutable protobuf builder reuse; each copy now gets its own IDs via clone() - Lower minimum payloadFrequencySeconds from 15s to 1s to support higher throughput load testing scenarios - Expand API endpoint variety to 20 unique routes with GET/POST/PUT/DELETE methods across all example definitions - Add payloadFrequencySeconds with rate control documentation to simple and demo definitions, defaulting to 5 minutes runtime at 5 traces/sec
Reduce trace generation rate to 5 traces every 10 seconds (0.5 traces/sec) for both simple and demo definitions, keeping the 5-minute total runtime. Made-with: Cursor
Extract minimum payload frequency into a variable so the error message reflects the actual configured threshold. Also fix missing spaces and add unit suffixes for clarity. Made-with: Cursor
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.
Summary
This PR modernizes the test-telemetry-generator to align with the latest OpenTelemetry semantic conventions, adds configurable diverse API endpoint generation, fixes a trace/span ID uniqueness bug, and improves load generation configurability.
Changes
1. Update to latest OTel semantic conventions
All example definition files (simple, demo, QA, JSON) have been updated to use current stable attribute names:
HTTP attributes:
http.method→http.request.methodhttp.target→url.pathhttp.scheme→url.schemenet.host.name→server.addresshttp.client_ip→client.addresshttp.route,http.response.status_code,server.port,network.protocol.versionDatabase attributes:
db.system→db.system.namedb.operation→db.operation.namenet.peer.ip→network.peer.addressnet.peer.name→server.addressdb.namespace,db.collection.name,network.peer.portMessaging attributes:
messaging.backend.topic→messaging.destination.nameResource attributes:
http.host→server.addresshttp.port→server.port2. Add diverse API endpoint generation via roundRobin
Expanded
roundRobinlists to 20 entries across HTTP methods (GET, POST, PUT, DELETE), URL paths, routes, DB operations, and collection names. This enables realistic load testing with diverse API traffic patterns without any code changes — just edit the YAML lists.3. Fix trace structure for inter-service calls (demo)
Restructured the demo trace definition to include proper
SPAN_KIND_CLIENT/SPAN_KIND_SERVERspan pairs for inter-service communication (frontend → checkout → email/currency), withurl.fullon client spans andurl.pathon server spans per OTel spec.4. Fix trace/span ID uniqueness bug
Fixed a bug in
SpansGenerator.javawhere ProtobufSpan.Builderobjects were mutated in-place, causing all copies within a payload cycle to share the same trace and span IDs. The fix clones the builder for each copy.5. Configurable load generation rate
payloadCount,copyCount, andpayloadFrequencySecondsto all example trace definitions with inline documentation explaining the formula:copyCount/payloadFrequencySecondspayloadCount×copyCountpayloadCount×payloadFrequencySecondspayloadFrequencySecondsfrom 15s to 1s inRootSpanDefinition.java6. Improve error messages
Extracted hardcoded threshold into a variable and fixed missing spaces and unit suffixes in validation error messages for
payloadFrequencySeconds.Files changed (9 files)
example-definitions/simple/trace-definition.yamlexample-definitions/demo/trace-definition.yamlexample-definitions/qa/trace-definition.yamlexample-definitions/simple/resource-definition.yamlexample-definitions/qa/resource-definition.yamlexample-definitions/json/trace-definition.jsonexample-definitions/json/resource-definition.jsonsrc/.../traces/SpansGenerator.javasrc/.../traces/dto/RootSpanDefinition.javaTest plan