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

[APM] Adding db statement to simple trace sample #129217

Closed

Conversation

cauemarcondes
Copy link
Contributor

@cauemarcondes cauemarcondes commented Apr 1, 2022

Relates to #129193

This PR adds a long db statement so we can test the UI.

@cauemarcondes cauemarcondes added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.3.0 labels Apr 1, 2022
@cauemarcondes cauemarcondes requested a review from a team April 1, 2022 15:23
@cauemarcondes
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@boriskirov boriskirov left a comment

Choose a reason for hiding this comment

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

We tested this scenario for database statements, and it worked quite well.

@cauemarcondes
Copy link
Contributor Author

@elasticmachine merge upstream

@cauemarcondes cauemarcondes requested a review from a team April 6, 2022 15:19
@cauemarcondes cauemarcondes requested a review from dgieselaar April 6, 2022 17:16
@cauemarcondes cauemarcondes enabled auto-merge (squash) April 6, 2022 17:18
@cauemarcondes cauemarcondes requested a review from dgieselaar April 7, 2022 19:07
instance
.span('GET apm-*/_search', 'db', 'elasticsearch')
.defaults({ 'span.db.statement': JSON.stringify(mockDbStatement) })
Copy link
Member

Choose a reason for hiding this comment

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

I think the format for ES requests is slightly different. Do you mind having a look at opbeans data and creating a function that formats it in the way the agent does? I think it's something like query parameters url encoded on the first line, then the actual request body on the second line.

.defaults({ 'span.db.statement': 'SELECT * FROM PRODUCTS' })
.duration(1000)
.success()
.destination('elasticsearch')
Copy link
Member

Choose a reason for hiding this comment

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

why does a SQL span talk to ES?

@cauemarcondes
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

auto-merge was automatically disabled May 9, 2022 13:12

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants