Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: log to span exporter #3003

Closed
wants to merge 5 commits into from
Closed

WIP: log to span exporter #3003

wants to merge 5 commits into from

Conversation

gramidt
Copy link
Member

@gramidt gramidt commented Apr 5, 2021

Description:
This exporter receives logs, converts them to trace spans, then exports the spans via OTLP over gRPC.

NOTE: This has been migrated from a PoC in a private distribution, and will be split up into multiple PRs once a more robust implementation is finalized.

Link to tracking Issue:
#3071

Testing:
Unit Tests

Documentation:
Code + README.

@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #3003 (69c46a6) into main (9a981e3) will decrease coverage by 0.22%.
The diff coverage is 49.61%.

❗ Current head 69c46a6 differs from pull request most recent head 7ab49b2. Consider uploading reports for the commit 7ab49b2 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3003      +/-   ##
==========================================
- Coverage   91.61%   91.38%   -0.23%     
==========================================
  Files         486      478       -8     
  Lines       23519    23299     -220     
==========================================
- Hits        21546    21291     -255     
- Misses       1463     1510      +47     
+ Partials      510      498      -12     
Flag Coverage Δ
integration 68.96% <ø> (+5.29%) ⬆️
unit 90.37% <49.61%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
exporter/logtospanexporter/log_to_span_pusher.go 11.42% <11.42%> (ø)
exporter/logtospanexporter/factory.go 94.11% <94.11%> (ø)
exporter/logtospanexporter/config.go 96.00% <96.00%> (ø)
processor/k8sprocessor/config.go 0.00% <0.00%> (-100.00%) ⬇️
...urcedetectionprocessor/internal/system/metadata.go 0.00% <0.00%> (-57.15%) ⬇️
receiver/carbonreceiver/factory.go 68.42% <0.00%> (-31.58%) ⬇️
receiver/receivercreator/factory.go 71.42% <0.00%> (-28.58%) ⬇️
exporter/elasticexporter/config.go 71.79% <0.00%> (-28.21%) ⬇️
receiver/windowsperfcountersreceiver/factory.go 88.23% <0.00%> (-11.77%) ⬇️
exporter/elasticexporter/factory.go 90.32% <0.00%> (-9.68%) ⬇️
... and 51 more

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 9a981e3...7ab49b2. Read the comment docs.

exporter/logtospanexporter/README.md Show resolved Hide resolved
W3CTraceContextFields W3CTraceContextFields `mapstructure:"w3c"`

// SpanName defines the name of the span.
SpanName string `mapstructure:"span_name"`
Copy link

Choose a reason for hiding this comment

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

Would it make sense to treat SpanName like the others and derive it from a specified attribute (maybe with an optional default)?

Copy link
Member Author

@gramidt gramidt Apr 6, 2021

Choose a reason for hiding this comment

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

That's exactly what it is; however, the comment is incorrect. haha

I also thought about having a default, but I'm not sure a default would ever be used...

Copy link

Choose a reason for hiding this comment

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

haha sorry that was obvious from context I just didn't catch it. Agreed probably no need for default.

Copy link
Member Author

Choose a reason for hiding this comment

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

No need to apologize. It helped catch the terrible comment :)

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2021

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 2, 2021
@bogdandrutu bogdandrutu removed the Stale label May 7, 2021
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 15, 2021
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this May 22, 2021
alexperez52 referenced this pull request in open-o11y/opentelemetry-collector-contrib Aug 18, 2021
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@jriguera
Copy link
Contributor

It seems this PR got abandoned. We have an use case where access logs from a PaaS (Cloudfoundry) have the tracing headers like x_b3_traceid:"12cf43fd0b6842067e45edca9c881012" x_b3_spanid:"7e45edca9c881012" x_b3_parentspanid:"-" and we would like to process those log lines as spans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants