-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Adding db statement to simple trace sample #129217
Conversation
@elasticmachine merge upstream |
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.
We tested this scenario for database statements, and it worked quite well.
@elasticmachine merge upstream |
packages/elastic-apm-synthtrace/src/scripts/examples/01_simple_trace.ts
Outdated
Show resolved
Hide resolved
instance | ||
.span('GET apm-*/_search', 'db', 'elasticsearch') | ||
.defaults({ 'span.db.statement': JSON.stringify(mockDbStatement) }) |
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.
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') |
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.
why does a SQL span talk to ES?
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Pull request was closed
Relates to #129193
This PR adds a long
db statement
so we can test the UI.