feat!: Send product metadata in custom header#62
Merged
liamhughes merged 5 commits intoMay 27, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds consumer product identification to outbound OctoToggle requests so Octopus can observe client/library usage over time (including endpoint and provider-version adoption), aligning this provider with the .NET and Java implementations referenced in the PR description.
Changes:
- Introduces
ProductMetadata(cleaning + validation) and makes it a required field onOctopusFeatureConfiguration(breaking change). - Sends an
X-Octopus-Clientheader on requests, combining consumer product name/version with this library name/version. - Adds Release Please manifest/config and a
src/version.tsconstant to keep provider version in sync with releases.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/version.ts | Adds a Release Please-managed provider version constant used in request telemetry. |
| src/specificationTests/fixtureEvaluationTests.test.ts | Updates spec tests to supply required productMetadata. |
| src/productMetadata.ts | Implements cleaning/validation for product name/version per RFC 9110 token chars. |
| src/productMetadata.test.ts | Adds unit tests for cleaning + validation behavior. |
| src/octopusFeatureProvider.ts | Makes productMetadata required in configuration and adjusts provider metadata. |
| src/octopusFeatureProvider.test.ts | Updates tests to pass the new required productMetadata. |
| src/octopusFeatureClient.ts | Adds X-Octopus-Client header construction and sends it via axios. |
| src/octopusFeatureClient.test.ts | Adds tests asserting correct X-Octopus-Client header formatting and sanitization. |
| src/index.ts | Exports ProductMetadata from the public package entrypoint. |
| release-please-config.json | Configures Release Please to also update src/version.ts. |
| README.md | Updates usage example to include ProductMetadata construction. |
| .release-please-manifest.json | Adds Release Please manifest with current version. |
| .github/workflows/build-test-release.yml | Switches Release Please action to use the new config/manifest files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
32
to
34
| metadata = { | ||
| name: OctopusFeatureProvider.name, | ||
| name: "octopus-ts-web-provider", | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
As an aside, I am aligning these between the three libraries.
https://openfeature.dev/specification/sections/providers/#requirement-211
dylanlerch
approved these changes
May 27, 2026
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.
Background
We want to be able to observe the usage of the OctoToggle service and its different API endpoints over time. For example, if we wish to deprecate an endpoint or know which customers are using a particular version of a provider library.
This PR is the TypeScript (web) equivalent of OctopusDeploy/openfeature-provider-dotnet#52 and OctopusDeploy/openfeature-provider-java#13.
Changes
ProductMetadataclass to clean, validate and contain the consumer provided product name and version values.ProductMetadatarequired field toOctopusFeatureConfigurationinterface (breaking change).version.tswith constant value for the provider version.package.json.X-Octopus-Clientheader to axios config.MyProduct/2024.1.0 openfeature-provider-ts-web/3.0.2Testing
In addition to automated tests, I have tested against an OctoToggle ephemeral environment.
With product version
Without product version