-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 new Elasticsearch reader implementation #2364
Conversation
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
9b66cf9
to
ff01edd
Compare
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
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.
Only part way through the PR, will look at the rest later - but one question I wanted to ask was about the location the ES client code.
Previously it was under the otel exporter because it was only handling ES writer - but now it also includes the query/reader side, having it reside under the exporter hierarchy is not so meaningful.
If we were to move it to a more independent location, would this cause issues with dependencies from the exporter? Or is there a suitable location that would be ok to use from exporter and query service?
cmd/opentelemetry/app/exporter/elasticsearchexporter/dependencystore/dependency_store.go
Outdated
Show resolved
Hide resolved
The new reader has to reside in the same go module as the We should move the |
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Codecov Report
@@ Coverage Diff @@
## master #2364 +/- ##
==========================================
- Coverage 95.61% 95.60% -0.02%
==========================================
Files 206 206
Lines 10542 10548 +6
==========================================
+ Hits 10080 10084 +4
- Misses 394 396 +2
Partials 68 68
Continue to review full report at Codecov.
|
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.
A few more comments - will eventually complete the review :)
"io" | ||
) | ||
|
||
const multiSearchHeaderFormat = `{"ignore_unavailable": "true"}` + "\n" |
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.
Could you add a comment to explain how this value relates to "HeaderFormat"?
@@ -115,57 +113,55 @@ func (s *IntegrationTest) esCleanUp(allTagsAsFields bool) error { | |||
} | |||
|
|||
func (s *IntegrationTest) initSpanstore(allTagsAsFields bool) error { | |||
bp, _ := s.client.BulkProcessor().BulkActions(1).FlushInterval(time.Nanosecond).Do(context.Background()) | |||
s.bulkProcessor = bp |
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.
Assume the bulk processor is being removed as it will now be supported via the otel batch processor?
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.
correct
cmd/opentelemetry/app/exporter/elasticsearchexporter/dependencystore/dependency_store.go
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 - just the few comments here and above.
cmd/opentelemetry/app/exporter/elasticsearchexporter/spanreader/validate_query.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@objectiser PR updated |
@pavolloffay I've noticed that since this PR the query to ES, when tags included, changed from:
To:
Any reason for this? I get 500 when I'm trying to search any tag that is not mapped to a keyword |
It might be a bug, could you please open an issue with some reproducer? |
@pavolloffay sure #2540 |
This PR adds new Elasticsearch reader implementation that uses https://github.com/elastic/go-elasticsearch which is the client that ES OTEL exporter uses and we would like to use it for all interactions with ES.
Notable changes: