Skip to content

DOCS-1752 - Add OpenAI C2C source doc - #6975

Open
amee-sumo wants to merge 4 commits into
mainfrom
OpenAIC2CSource
Open

DOCS-1752 - Add OpenAI C2C source doc#6975
amee-sumo wants to merge 4 commits into
mainfrom
OpenAIC2CSource

Conversation

@amee-sumo

Copy link
Copy Markdown
Collaborator

Purpose of this pull request

This pull request adds documentation for the new OpenAI Cloud-to-Cloud source, covering setup of the Admin API Key and collection of Organization Usage Costs data from the OpenAI Administration API.

Select the type of change

  • Minor Changes - Typos, formatting, slight revisions
  • Update Content - Revisions, updating sections
  • New Content - New features, sections, pages, tutorials
  • Site and Tools - .clabot, version updates, maintenance, dependencies, new packages for the site (Docusaurus, Gatsby, React, etc.)

Ticket (if applicable)

https://sumologic.atlassian.net/browse/DOCS-1752

Adds documentation for the new OpenAI Cloud-to-Cloud source, covering setup of the Admin API Key and collection of Organization Usage Costs data.
@amee-sumo amee-sumo self-assigned this Jul 30, 2026
@cla-bot cla-bot Bot added the cla-signed Contributor approved, listed in .clabot file label Jul 30, 2026
@JV0812

JV0812 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

This adds a new (Private Preview) OpenAI C2C source doc. Found two concrete issues by comparing the doc's JSON schema table against its own reference examples:

schemaRef JSON schema table uses smart/curly quotes instead of straight quotes, producing invalid JSON.

The row reads:

| schemaRef | JSON Object | `{"type": "OpenAI"}` | Yes | Define the specific schema type. |

I checked the raw bytes and confirmed those are typographic quotes (U+201C/U+201D — " "), not ASCII ". If a customer copy-pastes this directly into a JSON config, it's a syntax error. static/files/c2c/openai/example.json gets this right ("schemaRef": {"type": "OpenAI"} with straight quotes) — only the table row has the bad characters, likely from pasting out of a doc editor that auto-converts quotes.

pollingInterval is inconsistent between its own type/default, and is missing from both reference examples despite being marked Required.

The Configuration Object table says:

| pollingInterval | Integer | Yes | `5 minutes` | Time interval (in minutes)... |
  • Type is Integer but the default value 5 minutes is a string with a unit, not a valid integer.
  • It's marked Required: Yes, yet static/files/c2c/openai/example.json and example.tf both omit pollingInterval entirely from their config objects. A customer copying either reference example literally would be missing a required field.

Minor completeness gap (not blocking): the Source configuration steps link Project IDs and API Key IDs to #vendor-configuration for guidance, but that section only explains how to obtain the Admin API Key — it doesn't explain where to find Project IDs or API Key IDs.

Everything else — the cid-redirects.json entry, the Private Preview badge/noindex pattern, and the sidebar omission (consistent with this repo's convention of not listing Private Preview C2C sources in sidebars.ts) — looks correct.

@JV0812 JV0812 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The doc is well-structured overall, but the JSON schema table has two issues that would trip up anyone following it literally — see comment above for details. Please fix the smart quotes in the schemaRef row and reconcile pollingInterval's type/default/required status with the reference examples before merging.

Replaces smart quotes with straight quotes in the schemaRef JSON schema table row, and reconciles pollingInterval's type/default/required status with the reference examples.
@amee-sumo

Copy link
Copy Markdown
Collaborator Author

@JV0812 Thanks for the catch — both issues are fixed in 719185e:

  • schemaRef smart quotes: replaced with straight quotes ({"type": "OpenAI"}) so the table row is valid JSON.
  • pollingInterval: changed to Required: No with default 5 (matching its Integer type), and added "pollingInterval": 5 to both example.json and example.tf so the reference examples are complete.

Left the Project IDs/API Key IDs #vendor-configuration link gap as-is per your note that it's non-blocking — happy to follow up in a separate pass if you'd like it addressed now.

@amee-sumo
amee-sumo requested a review from JV0812 July 31, 2026 05:28

@JV0812 JV0812 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Confirmed both fixes directly against the PR head content: schemaRef now uses straight ASCII quotes, and pollingInterval is now Integer/Required: No/default 5, matching both reference examples (which now include the field). Verified with a clean local build. Approving.


| Polling Interval | Data |
|:--|:--|
| 5 minutes | [Organization Costs](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/usage/methods/costs) |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Configurable 5 min for Audit endpoint

Fix 24 hrs for cost endpoint

#### Prerequisites

- Requires an OpenAI API account with usage-based billing. New accounts receive a limited free credit grant.
- Admin API keys require an Organization Owner or Admin role. See [Rate limits](https://platform.openai.com/docs/guides/rate-limits) for tier details.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wrong link ref shared

| fields | JSON Object | No | `null` | JSON map of key-value fields (metadata) to apply to the Collector or source. Use the boolean field _siemForward to enable forwarding to SIEM.|`{"_siemForward": false, "fieldA": "valueA"}` |
| adminApiKey | String | Yes | `null` | OpenAI Admin API Key required for organization-level endpoints. | `sk-admin-` |
| projectIds | Array of String | No | `null` | Filter costs to specific project IDs. If empty, costs for all projects are returned. | |
| apiKeyIds | Array of String | No | `null` | Filter costs to specific API key IDs. If empty, costs for all API keys are returned. | |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like it's an old config; please reverify with the latest main repo
https://github.com/jasklabs/c2c-openai/blob/main/TDD.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Contributor approved, listed in .clabot file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants