[Synthetics] Add synthetics/api input + api / api.network data streams#19178
Draft
shahzad31 wants to merge 1 commit into
Draft
[Synthetics] Add synthetics/api input + api / api.network data streams#19178shahzad31 wants to merge 1 commit into
synthetics/api input + api / api.network data streams#19178shahzad31 wants to merge 1 commit into
Conversation
…streams Adds the Fleet integration package side of API Journey monitors so private locations can deliver `monitor.type: api` policies to Heartbeat. Companion to elastic/synthetics#997 (agent), elastic/beats#50802 (Heartbeat input), and elastic/kibana#270874 (UI / SO / project monitor). WHY: elastic/kibana#270874 has a TODO in `format_synthetics_policy.ts` explicitly waiting on this package — `inputs.find(input.type === 'synthetics/api')` resolves to undefined until a `synthetics >= 1.7.0` package is installed, so private-location API monitors return `hasInput: false` and surface a "package needs upgrade" warning. That PR also explicitly says the new input must be designed fresh, NOT forked from `synthetics/browser`, because the var schema differs. WHAT: * manifest.yml: bump 1.6.1 -> 1.7.0 and add `synthetics/api` input. * New data stream `api` (dataset `api`) — journey/step events for API monitors. ILM 30d hot / 365d delete (matches browser). Vars are the API-correct subset of browser: - drops `screenshots`, `throttling.config`, `synthetics_args` because `(*SourceJob).extraArgs` in elastic/beats#50802 strips `--sandbox`, `--screenshots`, `--throttling`/`--no-throttling` for `monitor.type: api`. - keeps `playwright_options` and `ignore_https_errors` (both supported by Playwright's APIRequestContext). - default `type: api`. Fields mirror browser, with `monitor.type: api`, a new `synthetics.journey.type` keyword (emitted by `synthexec/synthtypes.go` in elastic/beats#50802 and `JSONReporter` in elastic/synthetics#997), and the Chromium-only `browser.experience` / `browser.relative_trace` groups removed. * New data stream `api_network` (dataset `api.network`) — the dataset `synthexec/enrich.go` in elastic/beats#50802 routes API-journey `journey/network_info` events to. ILM 1d hot / 14d delete (matches browser_network). Fields mirror browser_network (TLS / server / resolve groups already covered by ECS) with the same `journey.type` addition. No stream-level vars — inherits from the parent `synthetics/api` input, same model as `browser_network`. Validated locally with `elastic-package format` and `elastic-package check` (lint + build green). Co-authored-by: Cursor <cursoragent@cursor.com>
💚 Build Succeeded
|
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.
Proposed commit message
Adds the Fleet integration package side of API Journey monitors so private locations can deliver
monitor.type: apipolicies to Heartbeat. Companion to:apiJourney(...)DSL using Playwright'sAPIRequestContext(no browser launch).apimonitor type for synthetics API journeys beats#50802 — Heartbeatmonitor.type: api(aliassynthetics/api) input.The Kibana PR has a TODO in
format_synthetics_policy.ts:inputs.find(input.type === 'synthetics/api')resolves toundefineduntil asynthetics >= 1.7.0package is installed, so private-location API monitors returnhasInput: falseand surface a "package needs upgrade" warning. That PR also explicitly says the new input must be designed fresh, not forked fromsynthetics/browser, because the var schema differs.What's in this PR
manifest.yml: bump1.6.1→1.7.0and addsynthetics/apiinput.New data stream
api(datasetapi) — journey/step events for API monitors. ILM 30d hot / 365d delete (matches browser). Vars are the API-correct subset of browser:screenshots,throttling.config,synthetics_argsbecause(*SourceJob).extraArgsin feat(heartbeat): addapimonitor type for synthetics API journeys beats#50802 strips--sandbox,--screenshots,--throttling/--no-throttlingformonitor.type: api.playwright_optionsandignore_https_errors(both supported by Playwright'sAPIRequestContext).type: api.monitor.type: api, a newsynthetics.journey.typekeyword (emitted bysynthexec/synthtypes.goin feat(heartbeat): addapimonitor type for synthetics API journeys beats#50802 andJSONReporterin feat: multi step api runner synthetics#997), and the Chromium-onlybrowser.experience/browser.relative_tracegroups removed.New data stream
api_network(datasetapi.network) — the datasetsynthexec/enrich.goin feat(heartbeat): addapimonitor type for synthetics API journeys beats#50802 routes API-journeyjourney/network_infoevents to. ILM 1d hot / 14d delete (matchesbrowser_network). Fields mirrorbrowser_network(TLS / server / resolve groups already covered by ECS) with the samejourney.typeaddition. No stream-level vars — inherits from the parentsynthetics/apiinput, same model asbrowser_network.Checklist
changelog.ymlfile.How to test this PR locally
End-to-end (requires the companion PRs):
apimonitor type for synthetics API journeys beats#50802 and a@elastic/syntheticsfrom feat: multi step api runner synthetics#997.synthetics-1.7.0package.inputs[].type: synthetics/apienabled and Heartbeat executes the journey.synthetics-api-defaultand per-request network events flow intosynthetics-api.network-default.Related issues
apimonitor type for synthetics API journeys beats#50802Out of scope / follow-ups
_dev/test/...(the package currently has none — separate effort).apiFormattersmap in elastic/kibana'sprivate_formatters/formatters.ts— needs to be authored against the var names declared here, not by reusingbrowserFormatters.Made with Cursor