Skip to content

feat: Add SDK wrapper metric tagging#542

Merged
keelerm84 merged 2 commits into
launchdarkly:v8from
tarqd:feat/wrapper-metric-tag
Oct 22, 2025
Merged

feat: Add SDK wrapper metric tagging#542
keelerm84 merged 2 commits into
launchdarkly:v8from
tarqd:feat/wrapper-metric-tag

Conversation

@tarqd

@tarqd tarqd commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Add a tag named sdkWrapper populated by the x-launchdarkly-wrapper header when provided

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Tagging metrics by wrapper name/version requested by customer


Note

Adds sdkWrapper metric tag (from X-LaunchDarkly-Wrapper) across measures, middleware, and events exporter, and changes empty tag sanitization to not-provided.

  • Metrics:
    • Add sdkWrapper tag key and include in publicTags/privateTags in internal/metrics/constants.go.
    • Extend WithGauge, WithCount, and WithRouteCount to accept sdkWrapper and tag it.
    • Update sanitizeTagValue to return "not-provided" for empty/whitespace and replace / with _.
    • Events exporter: parse sdkWrapper tag, include it in connection keys, and emit it in connections, newConnections, and pollingCounts payloads.
  • Middleware:
    • Read X-LaunchDarkly-Wrapper via getSDKWrapper and pass to metrics helpers in connection/request counters.
  • Tests:
    • Update metrics and middleware tests to expect sdkWrapper tag (defaulting to "not-provided") and new sanitization behavior; add tests for getSDKWrapper.

Written by Cursor Bugbot for commit 3bc475d. This will update automatically on new commits. Configure here.

@tarqd tarqd requested a review from a team as a code owner October 21, 2025 23:36
@keelerm84 keelerm84 closed this Oct 22, 2025
@keelerm84 keelerm84 reopened this Oct 22, 2025
@keelerm84 keelerm84 merged commit ab5a69b into launchdarkly:v8 Oct 22, 2025
23 of 26 checks passed
keelerm84 pushed a commit that referenced this pull request Oct 22, 2025
🤖 I have created a release *beep* *boop*
---


##
[8.14.0](v8.13.3...v8.14.0)
(2025-10-22)


### Features

* Add SDK wrapper metric tagging
([#542](#542))
([ab5a69b](ab5a69b))


### Bug Fixes

* **deps:** bump supported Go versions to 1.25.0 and 1.24.6
([#533](#533))
([8b70264](8b70264))
* **deps:** bump supported Go versions to 1.25.1 and 1.24.7
([#536](#536))
([fba0368](fba0368))
* **deps:** bump supported Go versions to 1.25.2 and 1.24.8
([#537](#537))
([8f50322](8f50322))
* **deps:** update Dockerfiles from 3.22.1 to alpine:3.22.2
([#539](#539))
([c686a36](c686a36))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Release 8.14.0 adding SDK wrapper metric tagging and updating
supported Go/Alpine versions; bump version strings and changelog.
> 
> - **Release 8.14.0**
>   - Add feature: SDK wrapper metric tagging.
>   - Update dependencies/runtime:
> - Supported Go versions bumped to 1.25.0/1.24.6, 1.25.1/1.24.7, and
1.25.2/1.24.8.
>     - Dockerfiles updated to `alpine:3.22.2`.
> - **Versioning**
> - Bump version to `8.14.0` in `.release-please-manifest.json` and
`relay/version/version.go`.
> - **Docs**
>   - Append `8.14.0` entry to `CHANGELOG.md` summarizing the above.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1462a57. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants