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

otelconf: add env var substitution in ParseYAML

Open codeboten opened this issue 1 year ago • 10 comments

This replaces the last bit of functionality that was opened in https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4826 to support env variable replacement. Pulled the envprovider.go code from https://github.com/open-telemetry/opentelemetry-collector/blob/main/confmap/provider/envprovider/provider.go

Fixes https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4373

codeboten avatar Oct 07 '24 22:10 codeboten

Blocked by #6796: https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6796#issuecomment-2672389835

MrAlias avatar Feb 20 '25 18:02 MrAlias

@MrAlias moved the code to the new package, this is no longer blocked by that. There's other comments to address that I'll get back to this week

codeboten avatar Mar 04 '25 23:03 codeboten

Codecov Report

:x: Patch coverage is 89.88764% with 9 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 78.6%. Comparing base (dcf3f0a) to head (566bb3e). :warning: Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
otelconf/internal/provider/envprovider.go 96.2% 2 Missing and 1 partial :warning:
otelconf/v0.2.0/config.go 40.0% 2 Missing and 1 partial :warning:
otelconf/v0.3.0/config.go 40.0% 2 Missing and 1 partial :warning:
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6215   +/-   ##
=====================================
  Coverage   78.6%   78.6%           
=====================================
  Files        184     185    +1     
  Lines      14673   14760   +87     
=====================================
+ Hits       11533   11611   +78     
- Misses      2789    2795    +6     
- Partials     351     354    +3     
Files with missing lines Coverage Δ
otelconf/internal/provider/envprovider.go 96.2% <96.2%> (ø)
otelconf/v0.2.0/config.go 76.9% <40.0%> (-3.5%) :arrow_down:
otelconf/v0.3.0/config.go 89.9% <40.0%> (-2.3%) :arrow_down:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Mar 04 '25 23:03 codecov[bot]

It is still blocked, until the release is cut. We agreed config and otelconf would remain in sync for this release.

dmathieu avatar Mar 05 '25 08:03 dmathieu

@dmathieu thanks for clarifying, with the next release started I don't suspect this change will be merged by then anyways :)

codeboten avatar Mar 05 '25 15:03 codeboten

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: codeboten / name: Alex Boten (0096a26f86a30ac8fa0d749003698cd50e021177, 02c19730865031e486b610808946039a9fdb945f, 03047ba621844bfdc4c0a9ec235960b71c227fb2, 033a9b07b5dbff8738f95b2e96f3ba8cadeb75ae, 0df38d68d107580de70c39448e0694f618432114, 10a9995ad161bfca76ae15b07f4e2a0dd0d55f24, 1b940c06aea382f15197af2216966fb82058688c, 1e1def9b68cce6ae50d19071c4a0f28a8105eb33, 1f01e74416b42841a1e780ddc5481ea90578b29a, 23c0e27262bb55d3692d24d95e10bbac6d471993, 23e79d191ff7b168d359b53806dc9e87f929c717, 24b34fceeff94ba1b1701451277814f38b7ebaaa, 2b18f76deaa4b525f455516f2d228fcbd84eebcc, 2b64316eb84830f0cbc1ff2c6bbdcac47aa5072c, 2b7bc4144b6e03eac98df01512e500b48ac4596d, 2d901e7796a5f20edb7f332637447c64490047fa, 3be5d305f83060369c019986b11c19edc4e0ec9c, 4582fa9f963531fbbc4ec205bbbbfacaed0807b9, 4f6adf1e13fe661ca8f3eba89de6dd3f03a4e49e, 566bb3eafab56c811350e87ef3a1ce01f983563a, 5ba56c8987864b408e7e0cbf70c072c7445f667d, 5c50ffe3a685e59db49f206bc67868998c58d6b4, 5cc32ba4744999114306f1169242e6312cb67bad, 625eeb3d7b5a3a24ea21fdc6e043408e996aab77, 6dddfc0a51677c92e019566875b955afa87b9b6a, 6de7dcf7fdd77131f11dd5ed4d84350824511436, 6eb93c9bb85b28d5010f0209c0cd19f9f04b2a39, 70c1ec63208762a5b7b10edcf102e42e67a65773, 75123efdd7d0464a512dd7784128bb7e7e3aabd9, 7a4100c430558fdba710b75a6b3cfe0e0e161a69, 8da3a52536ce2be93ed62dd8e3ce726025545126, 974a99303d7263b69e4058090b50d6bbbdb9c4ca, 97e812630fff5be465eea3ed9f12cde29eabf3d2, 97f331ba122130d2a22baab82ae309ddd1ebf422, 99e63b93a6232e636c461246bcf45a466cc016f3, 9b9fbb11bb903d3bbb70bafa86be54d29ea8cbb4, a79d02e4aa7b149f615bc07a2913685473f72863, aea0884137c02b7bab02464e2e6c2013c067254a, b5d68465ae8f252c645673c181be33ccb60cb74e, cc865163795c858d8cad73aa9e0422acfda24853, cc8b2772e7660bd63d6912cefb19cc0686f29094, d17c6ffc91c5d8b00fa24f3c3f5c2984cf47635c, d4a7fd201734b06100e1476e0e0be31ea8a348f6, d80500952f602ef6dff528c771e69261c4058568, d9df9a77dd17381b537ae29e8228e109c5d8db4b, dbf04db029df7ea89634e35133c60dca8e63172f, dcd3b498360072dc16b877417aba15490a87d882, e13c03b60f6f8fd91b196b9f8efba667e25912e4, e5ddb26d5e64f4aca60fb6d1ea094e711ec5c7fe, ec8d76d2f14e85c6f0250294c3898813385e68a8, ee10503b9249db0bc99ebca6f2f21185ada1bd00, fe5f71f3da327f30adaaed93df08a5946b309502)

CLA faillures is being investigated https://github.com/communitybridge/easycla/issues/4605

codeboten avatar Mar 05 '25 21:03 codeboten

/easycla

jarias-lfx avatar Mar 06 '25 13:03 jarias-lfx

@pellared would love a review from you as you've requested changes which I made

codeboten avatar Mar 18 '25 15:03 codeboten

@pellared would love a review from you as you've requested changes which I made

I will do my best to review this week. Thanks a lot.

pellared avatar Mar 26 '25 06:03 pellared

https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6215#discussion_r2403289205 is not addressed. Other than that, LGTM

pellared avatar Oct 07 '25 14:10 pellared

#6215 (comment) is not addressed. Other than that, LGTM

replied on the comment, i'm not sure how to move it forward

codeboten avatar Oct 07 '25 22:10 codeboten

@open-telemetry/go-approvers, would be nice to have more reviews. Otherwise, we can merge this on Thursday or Friday.

pellared avatar Oct 08 '25 05:10 pellared

@codeboten, thank you!

pellared avatar Oct 10 '25 07:10 pellared