[Heartbeat] Dedupe screenshots / Extra Args#25808
Conversation
|
Pinging @elastic/uptime (Team:Uptime) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
vigneshshanmugam
left a comment
There was a problem hiding this comment.
LGTM, tested and it works as expected.
We might need to change one more thing to get it merged. adding step/block to the screenshot datastream index.
|
PR now adds mapping and properly routes to correct dataset. Still needs tests |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
| - name: blocks | ||
| type: group | ||
| fields: | ||
| - name: hash |
There was a problem hiding this comment.
Need to add top and left here.
There was a problem hiding this comment.
I don't see the top & left yet in the new changes.
| fields: | ||
| - name: width | ||
| type: integer | ||
| description: Width of the full screenshot in pixels. |
There was a problem hiding this comment.
Shall we remove the use of full here? Full seems like full page screenshot but we are capture only the viewport width and height.
There was a problem hiding this comment.
Hmmm, I intended it to mean not of an individual block. I'll clarify that.
| } | ||
|
|
||
| // Default capabilities | ||
| capabilities = append(capabilities, "trace", "metrics", "filmstrips", "ssblocks") |
There was a problem hiding this comment.
I am not sure if its the right way to do it.
I was thinking we should make it configurable by introducing Capability flag in the config.go in addition to params and then using it here for experimentation.
moving forward once the feature is built in to the UI, we can add it to --rich-events in synthetics.
WDYT?
There was a problem hiding this comment.
Ah, I see what you mean. That makes sense, will make those changes!
|
This pull request is now in conflicts. Could you fix it? 🙏 |
| // or more contributor license agreements. Licensed under the Elastic License; | ||
| // you may not use this file except in compliance with the Elastic License. | ||
|
|
||
| package browser |
There was a problem hiding this comment.
This file isn't new, it's just moved. Enough of it changed due to renaming the ss var to s that git thinks it's all new.
| - name: blocks | ||
| type: group | ||
| fields: | ||
| - name: hash |
There was a problem hiding this comment.
I don't see the top & left yet in the new changes.
| }, | ||
| { | ||
| "kitchen sink", | ||
| &Config{SyntheticsArgs: []string{"--capability", "trace"}, Sandbox: true}, |
There was a problem hiding this comment.
I am curios to see a test with capability > 2 and other flags as part of synthetic args. Reason being variadic args are prone to errors.
Co-authored-by: Vignesh Shanmugam <vignesh.shanmugam22@gmail.com>
|
@vigneshshanmugam I believe I've addressed your concerns. I left out |
|
@andrewvc Spot on, Sounds good to me ++. |
|
@Mergifyio backport 7.x |
(cherry picked from commit db6738e) # Conflicts: # heartbeat/_meta/fields.common.yml # heartbeat/docs/fields.asciidoc # heartbeat/include/fields.go # x-pack/heartbeat/include/fields.go
|
Command
|
|
Command
|
* [Heartbeat] Dedupe screenshots / Extra Args (#25808) (cherry picked from commit db6738e) # Conflicts: # heartbeat/_meta/fields.common.yml # heartbeat/docs/fields.asciidoc # heartbeat/include/fields.go # x-pack/heartbeat/include/fields.go * Fix merge * Update fields docs Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
Counterpart of elastic/synthetics#282
Fixes: #26188
Adds support for screenshot blocks as mentioned in the synthetics PR, and also switches over to using the new flags / capabilities system. This is done by using
--rich-eventsby default as a synthetics flag, and also exposing a newsynthetics_argsoption for synthetics, allowing users to use configs like:This PR also moves some of the logic from
browser.gotosuite.go, which was also renamed to be cleaner and more in keeping with idiomatic go. This also made adding a small test possible. We still need a better story around E2E testing, but for now this will suffice.Finally, this adds mappings for
screenshot_refobjects as well as blocks, and routes them to the correct dataset. It also improves tests for enrichment of events to help test this.