Skip to content

[8.x] [Feature Flags] ECS-compliant logger (#214231)#214342

Merged
afharo merged 1 commit intoelastic:8.xfrom
afharo:backport/8.x/pr-214231
Mar 13, 2025
Merged

[8.x] [Feature Flags] ECS-compliant logger (#214231)#214342
afharo merged 1 commit intoelastic:8.xfrom
afharo:backport/8.x/pr-214231

Conversation

@afharo
Copy link
Member

@afharo afharo commented Mar 13, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

The OpenFeature clients receive a logger, but it logs errors like
`log('something went wrong', error)`. Our core logger then removes the
`error.message` as it prefers the message provided as the first
argument.

This PR wraps the logger to make sure that we handle this type of usage.

cc @pmuellr as he found out about this bug

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 98986a8)

# Conflicts:
#	src/core/packages/feature-flags/server-internal/src/feature_flags_service.ts
@afharo afharo requested a review from kibanamachine as a code owner March 13, 2025 10:42
@afharo afharo added the backport This PR is a backport of another PR label Mar 13, 2025
@afharo afharo enabled auto-merge (squash) March 13, 2025 10:42
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@afharo afharo merged commit 5a55190 into elastic:8.x Mar 13, 2025
11 checks passed
@afharo afharo deleted the backport/8.x/pr-214231 branch March 13, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants