Repository navigation
feat(client-generator): send the SDK usage event as the cli-otel CloudEvent - #3371
Open
AlbinaBlazhko17 wants to merge 6 commits into
Open
AlbinaBlazhko17 wants to merge 6 commits into
AlbinaBlazhko17 wants to merge 6 commits into
Conversation
🦋 Changeset detectedLatest commit: 4a416d2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📝 Recheck Summary
📋 Findings by rule🟡 technical-english/sentence-length: 0 errors, 2 warnings, 0 info Errors fail the full-tree check. Warnings and info are a worklist and do not block the PR. 📖 Readability of changed filesAutomated Readability Index (ARI): a U.S. grade level. Lower is easier to read.
|
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
Performance Benchmark (Lower is Faster)
|
AlbinaBlazhko17
marked this pull request as ready for review
November 5, 2026 14:49
JLekawa
approved these changes
Nov 5, 2026
vadyvas
approved these changes
Nov 6, 2026
| }; | ||
| }; | ||
| // The package root reaches its types through paths without an extension, which `nodenext` | ||
| // cannot resolve, so the types come from their own file. The prepare script inlines them. |
Contributor
There was a problem hiding this comment.
looks bad, but it seems not in this pr
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.
What/Why/How?
The usage telemetry event of generated clients had its own shape:
datawas an object withusageandsdkmaps, so it did not follow the CloudEvent schema of the other Redocly CLI events in@redocly/cli-otel.The generated TypeScript, Python, Go, and PHP clients now send the
com.redocly.sdkUsage.aggregatedCloudEvent from@redocly/cli-otel0.4.0:dataholds the operation with its counts, then the SDK.@redocly/cli-otel, and the prepare script inlines that type into the runtime source.processCloudEventAttributesof@redocly/cli-otelgives for the event. The end-to-end test of each language compares them key by key, so a change of the event in a new@redocly/cli-otelfails the tests until the four runtimes follow.sinkreceives the new event, so a sink that readdata.usagemust read the first item ofdata. The changeset says so.Reference
Testing
Locally, unit and E2E tests. The events of generated TypeScript, Python, Go, and PHP clients were also sent to a local OpenTelemetry collector.
Screenshots (optional)
Check yourself
Security