-
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
[KP] instrument platform server-side code with apm agent #70919
[KP] instrument platform server-side code with apm agent #70919
Conversation
…ecycles and SO migration
Pinging @elastic/kibana-platform (Team:Platform) |
@vigneshshanmugam Will we be able to see the added APM metrics in the Cloud? Or additional setup required? |
@restrry Are you referring to Metrics captured by the Node.js agent? You would be able to see them under Metrics tab in API UI. |
@vigneshshanmugam yeah, I tested it locally. I'm wondering when I can see them in APM for Cloud Dev env? |
@restrry Ah, got it. Seems like the clod is on 7.7 version, I will ask the team to update to the latest stack and you should be able to see it. |
if (migrationSpan) { | ||
migrationSpan.end(); | ||
} |
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.
NIT: migrationSpan?.end();
(multiple occurences)
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.
for this, we need to turn off eslint/no-unused-expressions
and use @typescript-eslint/no-unused-expressions
instead.
typescript-eslint/typescript-eslint#1220
Tested locally. Found the added transactions and spans, seems to be working as intended. Remark:
Just want to be sure that it really is what we want. Question: Are plugins supposed to be able to open a transaction during their |
I'd expect so, because
I didn't test this after the change. I will roll it back to |
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
@elasticmachine merge upstream |
@restrry could we get this in for 7.10? I'd love to include these metrics in our first iteration of APM on Cloud |
@joshdover sure, I will update the branch |
7ed70cf
to
0b091a5
Compare
updated |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
14e54aa
to
892a5a9
Compare
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
* instrument platform server-side code with apm agent: setup, start lifecycles and SO migration * add span type * span should have name: saved_objects.migration * remove migration reports * put migration span back
Summary
Adds tracking for setup & start lifecycles of Kibana server + SO migration operation.
How to test locally:
./scripts/compose.py start master --no-kibana
set
active: true, serverUrl: 'http://127.0.0.1:8200'
ELASTIC_APM_ACTIVE=true yarn start
./scripts/compose.py stop
For maintainers