Commit 6e06a6b
[Streams] Add curl/HTTP example to Logs Stream onboarding (elastic#241073)
Adds a curl/HTTP tab to the Streams Settings flyout onboarding,
providing users with a direct HTTP example for ingesting logs via the
`_bulk` API.
## Changes
- Added curl/HTTP as fifth shipper option alongside OTel, Filebeat,
Logstash, and Fleet
- Added descriptive text above the curl code block explaining how to use
the Bulk API, with a link to the Elasticsearch Bulk API documentation
- Added NDJSON bulk API example showing two log ingestion patterns:
- Structured format with nested `body` and `resource.attributes`
- Flat format with top-level `message` and `host.name`
- Configured JSON syntax highlighting for curl/HTTP tab (other tabs
remain YAML)
```typescript
// Example displayed in curl/HTTP tab
POST /logs/_bulk
{ "create": {} }
{ "@timestamp": "2025-05-05T12:12:12", "body": { "text": "Hello world!" }, "resource": { "attributes": { "host.name": "my-host-name" } } }
{ "create": {} }
{ "@timestamp": "2025-05-05T12:12:12", "message": "Hello world!", "host.name": "my-host-name" }
```
Aligns with <a
href="https://github.com/elastic/docs-content/pull/3683">docs-content#3683</a>.
Fixes elastic#241059
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>[Streams] Add curl example to Logs Stream
onboarding</issue_title>
> <issue_description>similar to the docs change, let's add one tab with
the same curl snippet:
>
> elastic/docs-content#3683
>
> <img width="1410" height="1322" alt="Image"
src="https://github.com/user-attachments/assets/0995ec98-0c65-49bb-8eff-bce7b836d071"
/></issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> <comment_new><author>@elasticmachine</author><body>
> Pinging @elastic/obs-ux-logs-team
(Team:obs-ux-logs)</body></comment_new>
> <comment_new><author>@flash1293</author><body>
> The tabs in
`x-pack/platform/plugins/shared/streams_app/public/components/stream_list_view/streams_settings_flyout.tsx`
need to be extended for this. The tab should be called `curl`, the
content should be
>
> ```
> POST /logs/_bulk
> { "create": {} }
> { "@timestamp": "2025-05-05T12:12:12", "body": { "text": "Hello
world!" }, "resource": { "attributes": { "host.name": "my-host-name" } }
}
> { "create": {} }
> { "@timestamp": "2025-05-05T12:12:12", "message": "Hello world!",
"host.name": "my-host-name" }
> ```</body></comment_new>
> </comments>
>
</details>
- Fixes elastic#241059
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: flash1293 <[email protected]>1 parent 2be9750 commit 6e06a6b
File tree
1 file changed
+42
-8
lines changed1 file changed
+42
-8
lines changedLines changed: 42 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
191 | 200 | | |
192 | 201 | | |
193 | 202 | | |
| |||
352 | 361 | | |
353 | 362 | | |
354 | 363 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
363 | 397 | | |
364 | 398 | | |
365 | 399 | | |
| |||
0 commit comments