-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split config into own package #1248
Conversation
remove custom config handling now that config can be used independent of SDK
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1248 +/- ##
============================================
- Coverage 73.97% 72.83% -1.14%
+ Complexity 2365 2335 -30
============================================
Files 347 346 -1
Lines 7071 6988 -83
============================================
- Hits 5231 5090 -141
- Misses 1840 1898 +58
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
IMO we shouldn't move everything out of the SDK, I would keep
We should also take file configuration and configuration via code into account. The configuration formats do not match 1:1 -> an intermediate instrumentation configuration model would make sense instead of using Example: HTTP instrumentation needs to know which request and response headers should be recorded as attributes. Env/ini configuration currently uses instrumentation:
config:
- http_client:
request_headers: []
response_headers: [] Both formats could then populate the following intermediate model that is made available via a registry class HttpClientInstrumentation implements InstrumentationConfiguration {
public function __construct(
public readonly array $requestHeaders = [],
public readonly array $responseHeaders = [],
) {}
} |
per review feedback, this can be checked with tests rather than at runtime
Removed.
I'm hesitant to do this, because then contrib packages need to depend on SDK to fetch config (unless we start splitting config up into
I started playing around with this. I thought perhaps factories could accept an |
I've created a prototype that utilizes the idea of #1274 to inject configuration into instrumentation: Nevay@2ecf4b2 |
Closing, replaced by #1304 |
Moving configuration code out of the SDK means that it can be used by components that should not depend on the SDK.
Prior to merge:
true
orfalse
Closes: #1245