[Screenshotting] instrument for benchmark tests using new EventLogger class#130356
Merged
tsullivan merged 37 commits intoelastic:mainfrom May 6, 2022
Merged
[Screenshotting] instrument for benchmark tests using new EventLogger class#130356tsullivan merged 37 commits intoelastic:mainfrom
tsullivan merged 37 commits intoelastic:mainfrom
Conversation
1ebae57 to
b27fdf9
Compare
b27fdf9 to
7d85baf
Compare
66c944f to
a003341
Compare
a003341 to
e9ade66
Compare
Contributor
|
Pinging @elastic/kibana-app-services (Team:AppServicesUx) |
62f808b to
396ea7c
Compare
6da7f5e to
295d2a9
Compare
295d2a9 to
7fd2b50
Compare
jloleysens
approved these changes
May 4, 2022
Contributor
jloleysens
left a comment
There was a problem hiding this comment.
Thanks for addressing my feedback @tsullivan ! This is looking really great. I did not test this locally (thanks for adding the tests!)
Member
Author
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Public APIs missing comments
History
To update your PR or re-run it, just comment with: |
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
May 9, 2022
…hromium-to-print-pdf-part-1 * 'main' of github.com:elastic/kibana: (59 commits) [Cloud Posture] Enabled findings group by feature (elastic#131780) [EBT] Fix `userId` generation (elastic#131701) [RAM] Add shareable rule tag filter (elastic#130710) Optimize package installation performance, phase 2 (elastic#131627) [Screenshotting] instrument for benchmark tests using new EventLogger class (elastic#130356) [Connector] Adding internal route for requesting ad-hoc ServiceNow access token (elastic#131171) [ci] bump kibana-buildkite-library (elastic#131754) [Synthetics] UI clean up (elastic#131598) [RsponseOps] Fix flaky rules list test (elastic#131567) [Cases] Add severity field to create case (elastic#131626) [Discover] Monospace font in Document Explorer (elastic#131513) Sessions tab improvements (elastic#131583) Add cloud icon "ess-icon" at the end of the config keys in "alerting" documentation (elastic#131735) [DOCS] Updates deprecation text for legacy APIs (elastic#131741) [ci] break out skip patterns so they can change without triggering CI (elastic#131726) Adjust search session management page font size (elastic#131291) [Unified search] Fix uptime css problem (elastic#131730) [Actionable Observability] Link to filtered rules page (elastic#131629) Add openAPI specifications for cases endpoint (elastic#131275) Display rule API key owner to users who can manage API keys (elastic#131662) ... # Conflicts: # x-pack/plugins/screenshotting/server/formats/pdf/index.ts # x-pack/plugins/screenshotting/server/screenshots/observable.ts
kertal
pushed a commit
to kertal/kibana
that referenced
this pull request
May 24, 2022
… class (elastic#130356) * use an EventLogger throughout a screenshotting flow * unique id for each pipeline flow * fix open_url logging * add comments * add unit test * fix getTimeRangeEnd * improve logging of thrown errors * log the number of pixels using zoom * use elementPositionAndAttributes for logging * fix tests * replace multiple methods for logging spans with single log method * fix test * fix sessionId not showing in error logs * prettify message * more logging improvements * add specific error logging around get screenshots * function level comments * error handling around getting render errors * ensure original logger.error always still called * fix error logs not having the right logging context * more error logging around pdfMaker * more error logging around re-position elements * fix test * fix error re-throw after logging * use apm to capture the error * simplify eventLogger api * single startTransaction method * shortcut methods for screenshot/pdf event log Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR follows the model of using a central event logger that was set by Reporting in #124762, and integrates APM within the logger.
Summary
We want benchmarks on basic stats encountered by the screenshotting plugin when it runs a screenshot operation.
See JSON logging format, and ECS data documentation: https://www.elastic.co/guide/en/kibana/master/logging-configuration.html#json-layout
Logging configuration
To test this PR, use the following logging configuration in the kibana.yml file. As you create test screenshot reports, the
kibana.logfile will be populated with data that Filebeat can ingest.Checklist
Delete any items that are not applicable to this PR.
Example logs
{ "message": "screenshot-pipeline starting", "kibana": { "screenshotting": { "action": "screenshot-pipeline-start", "session_id": "fdb42c7b-505b-4676-9a5c-6bb1a8971167" } }, "event": { "provider": "screenshotting" }, "ecs": { "version": "8.0.0" }, "@timestamp": "2022-04-18T11:03:46.219-07:00", "log": { "level": "DEBUG", "logger": "plugins.screenshotting.events" }, "process": { "pid": 428095 }, "trace": { "id": "140f9fa09315b0dcc196dd91443798c5" }, "transaction": { "id": "ae31694f8944d22e" } } { "message": "opening url", "kibana": { "screenshotting": { "action": "open-url-start", "session_id": "fdb42c7b-505b-4676-9a5c-6bb1a8971167" } }, "event": { "provider": "screenshotting" }, "ecs": { "version": "8.0.0" }, "@timestamp": "2022-04-18T11:03:46.309-07:00", "log": { "level": "DEBUG", "logger": "plugins.screenshotting.events" }, "process": { "pid": 428095 }, "span": { "id": "04eb3a42cf4cda22" }, "trace": { "id": "140f9fa09315b0dcc196dd91443798c5" } } { "message": "finished opening url", "kibana": { "screenshotting": { "action": "open-url-complete", "session_id": "fdb42c7b-505b-4676-9a5c-6bb1a8971167" } }, "event": { "duration": 2448, "provider": "screenshotting" }, "ecs": { "version": "8.0.0" }, "@timestamp": "2022-04-18T11:03:48.757-07:00", "log": { "level": "DEBUG", "logger": "plugins.screenshotting.events" }, "process": { "pid": 428095 }, "trace": { "id": "140f9fa09315b0dcc196dd91443798c5" }, "transaction": { "id": "ae31694f8944d22e" } } { "message": "getting number of visualization items", "kibana": { "screenshotting": { "action": "get-number-of-items-start", "session_id": "fdb42c7b-505b-4676-9a5c-6bb1a8971167" } }, "event": { "provider": "screenshotting" }, "ecs": { "version": "8.0.0" }, "@timestamp": "2022-04-18T11:03:48.757-07:00", "log": { "level": "DEBUG", "logger": "plugins.screenshotting.events" }, "process": { "pid": 428095 }, "span": { "id": "68006204c8c9114b" }, "trace": { "id": "140f9fa09315b0dcc196dd91443798c5" } } { "message": "received number of visualization items", "kibana": { "screenshotting": { "action": "get-number-of-items-complete", "items_count": 13, "session_id": "fdb42c7b-505b-4676-9a5c-6bb1a8971167" } }, "event": { "duration": 1045, "provider": "screenshotting" }, "ecs": { "version": "8.0.0" }, "@timestamp": "2022-04-18T11:03:49.802-07:00", "log": { "level": "DEBUG", "logger": "plugins.screenshotting.events" }, "process": { "pid": 428095 }, "span": { "id": "04eb3a42cf4cda22" }, "trace": { "id": "140f9fa09315b0dcc196dd91443798c5" } }