opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

config: Parse model from JSON

Open carrbs opened this issue 1 year ago • 4 comments

resolves #4412

Implements parsing of a JSON configuration file into an OpenTelemetryConfiguration, and tests it.

carrbs avatar Jan 13 '24 02:01 carrbs

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3cecdcf) 81.1% compared to head (d6381c7) 81.2%. Report is 20 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #4806   +/-   ##
=====================================
  Coverage   81.1%   81.2%           
=====================================
  Files        150     150           
  Lines      10753   10759    +6     
=====================================
+ Hits        8725    8740   +15     
+ Misses      1872    1861   -11     
- Partials     156     158    +2     
Files Coverage Δ
config/config.go 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes

codecov[bot] avatar Jan 16 '24 09:01 codecov[bot]

Now, I see that the specification currently only requires implementing parsing of YAML: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#parse

@codeboten should we change to draft (or even close) this PR? WDYT?

pellared avatar Jan 16 '24 17:01 pellared

@pellared it might make sense to only implement YAML and leave JSON until there's a need for it. @carrbs do you have a specific need for JSON parsing to be implemented?

codeboten avatar Jan 16 '24 21:01 codeboten

@carrbs do you have a specific need for JSON parsing to be implemented?

@codeboten, not at all, I was just looking for low hanging fruit to work on. Closing this sounds good to me!

carrbs avatar Jan 16 '24 21:01 carrbs