-
Notifications
You must be signed in to change notification settings - Fork 440
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
Add Elasticsearch Log Exporter with tests #444
Add Elasticsearch Log Exporter with tests #444
Conversation
Codecov Report
@@ Coverage Diff @@
## master #444 +/- ##
=======================================
Coverage 94.44% 94.44%
=======================================
Files 187 187
Lines 8244 8244
=======================================
Hits 7786 7786
Misses 458 458
|
Though I don't have strong opinion, would be good to get other's opinion for the right repo to merge this exporter PR, and other similar PRs - main or contrib. As per spec guidelines - https://github.com/open-telemetry/opentelemetry-specification/blob/0229140bb13e8473f7c51513afd12e2a60618488/specification/library-guidelines.md#requirements
|
Also, please create a github issue for having an example on how to run this against elastic server. As we have for otlp: |
8191b46
to
0dbe417
Compare
exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h
Outdated
Show resolved
Hide resolved
79e6591
to
e1c34b1
Compare
exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_exporter.h
Outdated
Show resolved
Hide resolved
e1c34b1
to
c2ef1af
Compare
exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h
Show resolved
Hide resolved
exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h
Outdated
Show resolved
Hide resolved
exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_exporter.h
Outdated
Show resolved
Hide resolved
exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM: If we can invest some time for example code as done for OTLP exporter, that would be great:
https://github.com/open-telemetry/opentelemetry-cpp/tree/master/examples/otlp
Or else please create a github issue for same.
I have an Elasticsearch example written in my team repo right now, but I'm holding off for PRing it until this one gets merged. I think Its the same situation for the ostream exporter too, so 2 more future PRs! |
"-DEFAULTLIB:crypt32.lib", | ||
"-DEFAULTLIB:Normaliz.lib", | ||
], | ||
"//conditions:default": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: Really want to clean this up... glad it's working though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIk you only have two concurrency things happening here:
- The HTTP libraries connection handling thread(s).
- Your exporter, waiting to fire off a batch of data.
The threading code looks a little suspect (especially instantiating a local mutex). Effectively you'll want some kind of memory barrier around access the shared variables between threads or you can use atomic variables to control that.
f7dda89
to
6fd1289
Compare
056e9cc
to
0526050
Compare
This PR adds an Elasticsearch exporter for logs, which is a requirement from issue #337. The main features include:
Before reviewing this PR, it should be noted that:
cc - @xukaren @alolita @lalitb @jsuereth @ThomsonTan