Skip to content

loggingexporter: fix handling the loop for empty attributes#2610

Merged
tigrannajaryan merged 1 commit intoopen-telemetry:mainfrom
pmm-sumo:logging-exporter-loop-fix
Mar 5, 2021
Merged

loggingexporter: fix handling the loop for empty attributes#2610
tigrannajaryan merged 1 commit intoopen-telemetry:mainfrom
pmm-sumo:logging-exporter-loop-fix

Conversation

@pmm-sumo
Copy link
Copy Markdown
Contributor

@pmm-sumo pmm-sumo commented Mar 5, 2021

Description:

When span was containing several events, only the first one was printed out by the logging exporter. After checking the code it, turned out that handling the case with no attributes returns from the iteration loop altogether, which is wrong. The same bug was introduced for span links.

Link to tracking Issue: N/A

Testing: Just manual tests performed for Span Events

Documentation: N/A

@pmm-sumo pmm-sumo requested a review from a team March 5, 2021 14:30
@pmm-sumo pmm-sumo changed the title [logging exporter] Fix handling the loop for empty attributes loggingexporter: Fix handling the loop for empty attributes Mar 5, 2021
@pmm-sumo pmm-sumo changed the title loggingexporter: Fix handling the loop for empty attributes loggingexporter: fix handling the loop for empty attributes Mar 5, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 5, 2021

Codecov Report

Merging #2610 (3ce79b5) into main (bf8b945) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2610   +/-   ##
=======================================
  Coverage   92.02%   92.02%           
=======================================
  Files         271      271           
  Lines       15446    15446           
=======================================
  Hits        14214    14214           
  Misses        850      850           
  Partials      382      382           
Impacted Files Coverage Δ
exporter/loggingexporter/logging_exporter.go 96.28% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf8b945...3ce79b5. Read the comment docs.

@tigrannajaryan tigrannajaryan merged commit b32cf50 into open-telemetry:main Mar 5, 2021
This was referenced Mar 11, 2021
This was referenced Mar 15, 2021
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
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.

3 participants