Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 11 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ rustc-hash = "2.1.2"
futures-core = "0.3.31"
tempfile = "3.20.0"
lazy_static = "1.4.0"
prost = "0.13.1"
prost = "0.14.1"
dashmap = "6.2.1"
parking_lot = "0.12.5"
indexmap = { version = "2.14.0", features = ["serde"] }
Expand Down Expand Up @@ -265,3 +265,7 @@ codegen-units = 1
[profile.release-thin-lto]
inherits = "release"
lto = "thin"

[[example]]
name = "otlp_stage"
path = "scripts/ingest-performance/otlp_stage.rs"
2 changes: 1 addition & 1 deletion frontend/docs/observability-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Dependencies require a child span and its parent in the same dataset/time window

JSON HTTP targets `/api/v1/ingest`; OTLP HTTP targets `/v1/logs`, `/v1/metrics` or `/v1/traces`. Dataset creation supplies the matching telemetry type and source (`json`, `otel-logs`, `otel-metrics`, `otel-traces`). Existing metadata must match the selected source/signal before configuration becomes available. Destinations with custom partitions show the required field names and instructions to select/create an unpartitioned dataset or configure a sender manually. Generated configuration, copying and guided verification stay unavailable for those destinations because setup cannot infer valid partition values. JSON input uses logs; other sources choose one signal per dataset.

Generated collector configuration uses `otlp_http/parseable`, HTTP JSON encoding, `compression: none`, `X-P-Stream`, and an environment variable for the ingest API key. Receivers bind to localhost on ports 4317/4318 and must be adjusted for other deployment arrangements. The native OSS server accepts JSON OTLP HTTP rather than protobuf; its content type is `application/json`. Collector configuration converts compatible sender traffic. Setup does not deploy or start a sender.
Generated collector configuration uses `otlp_http/parseable`, HTTP protobuf encoding, `compression: none`, `X-P-Stream`, and an environment variable for the ingest API key. Receivers bind to localhost on ports 4317/4318 and must be adjusted for other deployment arrangements. The native OSS server accepts OTLP HTTP as protobuf (`application/x-protobuf`) or JSON (`application/json`); the generated curl sample sends JSON. Collector configuration converts compatible sender traffic. Setup does not deploy or start a sender.

Endpoint validation permits HTTP/HTTPS base URLs and reverse proxy base paths, and rejects embedded credentials, query/fragment strings, variables, whitespace, backslashes and appended ingestion routes. Commands quote shell values and dataset names are validated. Credentials are entered into the sender's environment rather than persisted by this setup. Copy success and failure are visible, with manual copying available when the browser denies clipboard access.

Expand Down
9 changes: 8 additions & 1 deletion frontend/e2e/ingestion.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,15 @@ test('demo switches source and signal, blocks incompatible datasets, and copies
await expect(page.getByLabel('Ingestion command', { exact: true })).toHaveCount(0);
await page.getByLabel('Destination dataset', { exact: true }).selectOption('demo_metrics');
await expect(page.getByLabel('Ingestion command', { exact: true })).toContainText('/v1/metrics');
// The note under the snippet names the encoding the snippet uses
await expect(
page.getByText('This configuration uses JSON and sends only metrics to this dataset.'),
).toBeVisible();
await page.getByRole('radio', { name: /^OpenTelemetry Collector/ }).check();
await expect(page.getByLabel('collector.yaml', { exact: true })).toContainText('encoding: json');
await expect(page.getByLabel('collector.yaml', { exact: true })).toContainText('encoding: proto');
await expect(
page.getByText('This configuration uses protobuf and sends only metrics to this dataset.'),
).toBeVisible();
await expect(page.getByLabel('collector.yaml', { exact: true })).toContainText(
'X-P-Stream: "demo_metrics"',
);
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/features/ingestion/ConnectionConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ export function ConnectionConfig({
)}
{options.source !== 'json' && (
<p>
Parseable OSS accepts OTLP over HTTP with JSON encoding. Use a collector to convert
SDK protobuf traffic. The configuration sends only {options.signal} to this dataset.
Parseable OSS accepts OTLP over HTTP with JSON or protobuf encoding. This
configuration uses {options.source === 'collector' ? 'protobuf' : 'JSON'} and sends
only {options.signal} to this dataset.
</p>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/features/ingestion/IngestionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ function IngestionWorkspace() {
<div className="ingestion-guide-divider" />
<h3>Sending OpenTelemetry?</h3>
<p>
Use HTTP with JSON encoding. A collector can receive your SDK's OTLP traffic and forward
compatible JSON to Parseable.
Use OTLP over HTTP with JSON or protobuf encoding. A collector can receive your SDK's
OTLP traffic and forward it to Parseable.
</p>
<a
className="text-link"
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/ingestion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('configuration generation', () => {
expect(code).not.toContain('/api/v1/ingest');
});
it.each(['logs', 'metrics', 'traces'] as const)(
'builds only the selected collector %s pipeline with JSON encoding',
'builds only the selected collector %s pipeline with protobuf encoding',
(signal) => {
const code = generateIngestionConfig({
endpoint: 'https://example.com/base',
Expand All @@ -77,7 +77,7 @@ describe('configuration generation', () => {
signal,
});
expect(code).toContain('otlp_http/parseable:');
expect(code).toContain('encoding: json');
expect(code).toContain('encoding: proto');
expect(code).toContain('compression: none');
expect(code).toContain('Authorization: "Bearer ${env:PARSEABLE_API_KEY}"');
expect(code).toContain(`X-P-Stream: "otel_${signal}"`);
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/lib/ingestion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ export function generateIngestionConfig(options: IngestionOptions): string {
const endpoint = options.endpoint.replace(/\/+$/, '');
const signal = options.source === 'json' ? 'logs' : options.signal;
if (options.source === 'collector') {
// Current collector exporter name; JSON is required by the OSS backend.
// Current collector exporter name. Protobuf is the exporter's default and
// costs the server less than JSON; the server this UI ships with accepts it.
// Disable default gzip: this backend does not implement body decompression.
return `receivers:
otlp:
Expand All @@ -192,7 +193,7 @@ processors:
exporters:
otlp_http/parseable:
endpoint: ${JSON.stringify(endpoint)}
encoding: json
encoding: proto
compression: none
headers:
Authorization: "Bearer \${env:PARSEABLE_API_KEY}"
Expand Down
2 changes: 1 addition & 1 deletion frontend/story-tests/observability-components.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ test('OTLP signal and destination compatibility gate configuration and collector
await expect(page.locator('.ingestion-code-block pre')).toContainText('"resourceSpans"');
await page.getByRole('radio', { name: /^OpenTelemetry Collector/ }).check();
const collector = page.locator('pre[aria-label="collector.yaml"]');
await expect(collector).toContainText('encoding: json');
await expect(collector).toContainText('encoding: proto');
await expect(collector).toContainText('compression: none');
await expect(collector).toContainText('X-P-Stream: "otel_traces"');
await expect(collector).toContainText('pipelines:\n traces:');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions scripts/ingest-performance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,46 @@ python scripts/ingest-performance/plot.py --burst /abs/results/burst --sustained
The local-store results do not establish S3 ingestion capacity. Multipart memory and failure behavior require separate storage probes. Keep exact build provenance and limitations with any reported figures.

For fixed-work 1/10/100/1000-row request comparisons and timestamp-adjusted compatibility probes, see [small-batch-staging](small-batch-staging/README.md).

## OTLP protobuf and JSON

This comparison uses one release server binary and varies the request encoding.
Build the server and stage example with the same toolchain and features. Install
the generated OTLP protobuf bindings in an isolated Python environment. They
serialize a single typed fixture to both formats, with OTLP JSON hex IDs, and
require no client build. The timed modes require Linux, passwordless sudo to
launch and signal perf, working `instructions:u` and `task-clock` counters,
and perf FIFO control.

```sh
NEXT_ASSETS_PATH=/abs/frontend/dist cargo build --locked --release --bin parseable --example otlp_stage
python3 -m venv /abs/otlp-venv
/abs/otlp-venv/bin/pip install opentelemetry-proto==1.38.0 protobuf==6.32.1
/abs/otlp-venv/bin/python -B -m unittest discover -s scripts/ingest-performance -p 'test_*.py' -v
/abs/otlp-venv/bin/python scripts/ingest-performance/otlp.py stage --example target/release/examples/otlp_stage --output /abs/results/otlp-stage --cpus 2
/abs/otlp-venv/bin/python scripts/ingest-performance/otlp.py http --binary target/release/parseable --output /abs/results/otlp-http --cpus 2,4,6,8
/abs/otlp-venv/bin/python scripts/ingest-performance/otlp.py verify --binary target/release/parseable --output /abs/results/otlp-verify
```

Choose CPU IDs available on the host. Both timed modes default to four pairs in
JSON/protobuf/protobuf/JSON order, repeated twice. The stage run checks exact
flattened rows before comparing 1, 100 and 5000 records with 4 or 32 attributes
per record. Its default is 50,000 records per arm per shape. Counters cover the
in-memory decode, flatten and row destruction; fixture loading and the equality
check occur before measurement. The HTTP run defaults to 256 timed requests of
100 records with 4 attributes per arm per signal over one keep-alive connection.
Change the shape with `--rows`, `--attributes` or `--requests`. After each signal's
ACK window, the runner checks query counts and every request/row ID, then hashes
all canonicalized SQL results with `p_timestamp` removed for comparison.

The fixtures use explicit timestamps, two resource attributes, one scope,
four base record attributes including the two identity fields, and an optional
set of mixed scalar attributes. They contain string-bodied INFO logs, gauge
points without implicit `target_info` rows, and server spans without events or
links. The `verify` mode checks accepted content types and gzip, success
responses, malformed/truncated requests and the default payload limit with
chunked bodies for each signal. Each mode writes `summary.json` with paired ratios and min/max, or the
recorded protocol responses for `verify`. The HTTP CPU measurements include
server work that overlaps the ACK window and exclude subsequent query and drain
work. Record the source commit, release profile, features and binary hashes
alongside your summaries.
Loading
Loading