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

Elasticsearch connector should log stacktrace when failure in flow #2985

Open
kkoteeswaran opened this issue Jun 9, 2023 · 1 comment
Open

Comments

@kkoteeswaran
Copy link

Versions used

Scala2.12, Akka 2.6.20, Alapakka Elasticsearch Connector 3.0.4.

Akka version:
Akka 2.6.20

Expected Behavior

When there is a failure returned from Elasticsearch in the flow, the entire stacktrace should be logged to help us identify the root cause and remediate.

Actual Behavior

Only the exception is logged. For example:

akkaAddress: akka://job-manager akkaSource: ElasticsearchSimpleFlowStage$StageLogic(akka://job-manager) akkaTimestamp: 21:52:49.005UTC akkaUid: 4755885413838281407 level: ERROR logger_name: akka.stream.alpakka.elasticsearch.impl.ElasticsearchSimpleFlowStage$StageLogic message: Received error from elastic after having already processed 0 documents. Error: java.lang.RuntimeException: Request failed for POST https://query-elasticsearch-prod1.es.eastus2.azure.elastic-cloud.com:9243/_bulk
In this case, there were no status code returned from elastic so full stacktrace would have helped.

Relevant logs

log.error(s"Received error from elastic after having already processed {} documents. Error: {}",

Reproducible Test Case

Please provide a PR with a failing test.

If the issue is more complex or requires configuration, please provide a link to a project that reproduces the issue.

@ennru
Copy link
Member

ennru commented Jun 16, 2023

I'm not sure how much more information there might be available after posting to Elasticsearch.
Would you be in a position to suggest an improvement?

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

No branches or pull requests

2 participants