Skip to content

Conversation

maryliag
Copy link
Contributor

@maryliag maryliag commented Oct 8, 2025

Parse Logger Provider

@maryliag maryliag requested a review from a team as a code owner October 8, 2025 18:29
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 91.54930% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.99%. Comparing base (471b411) to head (eff2f69).

Files with missing lines Patch % Lines
...ntelemetry-configuration/src/FileConfigProvider.ts 92.42% 5 Missing ⚠️
...try-configuration/src/EnvironmentConfigProvider.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5995   +/-   ##
=======================================
  Coverage   94.99%   94.99%           
=======================================
  Files         313      314    +1     
  Lines        8775     8837   +62     
  Branches     1884     1909   +25     
=======================================
+ Hits         8336     8395   +59     
- Misses        439      442    +3     
Files with missing lines Coverage Δ
...ntelemetry-configuration/src/models/commonModel.ts 100.00% <ø> (ø)
...ntelemetry-configuration/src/models/configModel.ts 100.00% <100.00%> (ø)
...ry-configuration/src/models/loggerProviderModel.ts 100.00% <100.00%> (ø)
...try-configuration/src/EnvironmentConfigProvider.ts 92.44% <0.00%> (ø)
...ntelemetry-configuration/src/FileConfigProvider.ts 95.20% <92.42%> (-0.07%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maryliag
Copy link
Contributor Author

cc @JamieDanielson just merged with main, after the tracer parser PR was merged, so this PR is ready for review and should be straight forward now 😄

Copy link
Member

@JamieDanielson JamieDanielson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @maryliag ! I've left some questions and notes for your review.

element['exporter'],
ProviderType.LOGGER
);
const simpleConfig: SpanProcessor = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a log processor?

},
loggers: [
{
name: 'io.opentelemetry.contrib.*',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this doesn't matter but I think this is the prefix for java instrumentations not js right?

Comment on lines +651 to +655
const loggers = [];
for (
let i = 0;
i < loggerProvider['logger_configurator/development'].loggers.length;
i++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit... could we replace with something like

const container = loggerProvider['logger_configurator/development'];
for (const logger of container.loggers) {
  ...
}

element['exporter'],
ProviderType.LOGGER
);
const batchConfig: SpanProcessor = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a log processor?

function parseConfigExporter(
exporter: SpanExporter,
providerType: ProviderType
): SpanExporter {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are now using this for multiple signals, do we need to return different exporters for each signal (e.g. LogExporter vs SpanExporter)?

}
const attrList = getStringFromConfigFile(
parsedContent['resource']?.['attributes_list']
parsedContent['resource']['attributes_list']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing utils, I think resource could still be undefined here right? Is there a reason to drop the optional chaining?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants