feat: Log environment IDs in SDK endpoints#5365
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
Contributor
Docker builds report
|
Contributor
|
Uffizzi Preview |
46264d4 to
c614d51
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5365 +/- ##
=======================================
Coverage 97.61% 97.61%
=======================================
Files 1237 1237
Lines 42971 42974 +3
=======================================
+ Hits 41948 41951 +3
Misses 1023 1023 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rolodato
approved these changes
Apr 21, 2025
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.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Changes
In this PR, we use functionality added by Flagsmith/flagsmith-common#55 to log environment IDs in SDK endpoints.
The resolved environment ID can be aded by adding
%{flagsmith.environment_id}etoACCESS_LOG_FORMAT, or settingACCESS_LOG_JSON_EXTRA_ITEMSto"{flagsmith.environment_id}e"for surfacing it in JSON access logs.How did you test this code?
Ran Core API locally and
curl localhost:8000/api/v1/environment-document/ -H 'X-Environment-Key: <locally created server API key>':