Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

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)
// 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 docs-content#3683.

Fixes #241059

Original prompt

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

Image</issue_description>

Comments on the Issue (you are @copilot in this section)

@elasticmachine Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) @flash1293 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>


💡 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 in the docs.

Copilot AI changed the title [WIP] Add curl example tab to Logs Stream onboarding [Streams] Add curl example to Logs Stream onboarding Oct 29, 2025
Copilot finished work on behalf of flash1293 October 29, 2025 09:01
Copilot AI requested a review from flash1293 October 29, 2025 09:01
@flash1293 flash1293 added the ci:project-deploy-observability Create an Observability project label Oct 29, 2025
@flash1293 flash1293 marked this pull request as ready for review October 29, 2025 09:05
@flash1293 flash1293 requested a review from a team as a code owner October 29, 2025 09:05
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@flash1293 flash1293 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:Streams This is the label for the Streams Project Team:streams-program Team Label for Streams program v9.3.0 labels Oct 29, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/streams-program-team (Team:streams-program)

@flash1293
Copy link
Contributor

flash1293 commented Oct 29, 2025

@copilot We should also get this description in there above the code block:

Send data to the /logs/ endpoint using the Bulk API. Refer to the following example for more information:

@flash1293
Copy link
Contributor

@copilot see above

Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot We should also get this description in there above the code block:

Send data to the /logs/ endpoint using the [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/ope...

Added the description text above the curl code block in commit b989f98.

The curl tab now displays:

  • Description paragraph: "Send data to the /logs/ endpoint using the Bulk API. Refer to the following example for more information:" (with a link to the Bulk API documentation)
  • Followed by the curl example code block

The description only appears when the Curl tab is selected, matching the pattern used for the Fleet tab.

Copilot finished work on behalf of flash1293 October 29, 2025 15:05
@flash1293
Copy link
Contributor

@copilot looks good to me, please change the tab name to curl/HTTP instead to be more precise

Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot looks good to me, please change the tab name to curl/HTTP instead to be more precise

Changed the tab label from "Curl" to "curl/HTTP" in commit b7a8ea7.

Copilot AI changed the title [Streams] Add curl example to Logs Stream onboarding [Streams] Add curl/HTTP example to Logs Stream onboarding Oct 29, 2025
Copilot finished work on behalf of flash1293 October 29, 2025 15:49
Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Screenshot 2025-10-29 at 16 55 02

@flash1293 flash1293 enabled auto-merge (squash) October 29, 2025 15:55
@flash1293
Copy link
Contributor

/ci

@flash1293
Copy link
Contributor

run docs-build

@flash1293
Copy link
Contributor

run docs-build

@flash1293
Copy link
Contributor

/ci

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 3, 2025

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: b62f93f
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-241073-b62f93f21611

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #64 / Agents fleet_list_agent should return metrics if available and called with withMetrics

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
streamsApp 908.3KB 909.2KB +943.0B

History

cc @flash1293 @Copilot

Copy link
Contributor

@klacabane klacabane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

curl-http-streams

@flash1293 flash1293 merged commit 39b487f into main Nov 4, 2025
12 checks passed
@flash1293 flash1293 deleted the copilot/add-curl-example-to-logs-stream branch November 4, 2025 08:55
wildemat pushed a commit to wildemat/kibana that referenced this pull request Nov 5, 2025
…1073)

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:project-deploy-observability Create an Observability project 💝community Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes Team:streams-program Team Label for Streams program v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Streams] Add curl example to Logs Stream onboarding

5 participants