Library-config component initial skeleton#807
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #807 +/- ##
==========================================
- Coverage 71.01% 70.89% -0.13%
==========================================
Files 316 319 +3
Lines 46261 46768 +507
==========================================
+ Hits 32852 33155 +303
- Misses 13409 13613 +204
|
BenchmarksComparisonBenchmark execution time: 2025-01-16 19:03:45 Comparing candidate commit d7849ed in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
a55b907 to
903066d
Compare
adda6a7 to
6b83b48
Compare
286e02f to
9c094b2
Compare
9c094b2 to
8ffe755
Compare
ac91fd7 to
766522b
Compare
8ce380c to
8a71af6
Compare
integration with other repositories * Change returned configurations to always be string * Modify API to provide file path on config get
341a1da to
08fa3d9
Compare
bantonsson
left a comment
There was a problem hiding this comment.
Looks good in general for a POC. Would love more comments on the methods going forward.
| templated.push_str(head); | ||
| let Some((template_var, tail)) = after_bracket.split_once("}}") else { | ||
| anyhow::bail!("unterminated template in config") | ||
| }; |
There was a problem hiding this comment.
Not for now, but the parsing here could be made a bit more robust so that broken things like {{ ... {{ ... }} would get a better error message than UNDEFINED.
There was a problem hiding this comment.
I'm not sure what behavior we should have actually.
Either:
- we skip this specific config, and log something
- we try to replace invalid values, and probably log something too
- we skip all configurations and return an error
* Change builder feature name to be consistent with other ones
What does this PR do?
Add a library configuration component
This component currently only support the stable configuration POC
The goal of this experiment is to parse a configuration file at the system level, and use that file to determine what configuration to apply to the current instance of the APM library.
It exposes a fairly simple FFI interface:
The FFI is built in the profiling artifact under an optional feature flag
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.