Prerequisites
- Node.js 14 or later
- npm or yarn
- A running OTel Collector configured to forward logs and traces to Bronto — see Connect Open Telemetry to Bronto
- OpenTelemetry JavaScript SDK documentation
Install dependencies
Configure the OTel logger provider
Set up aLoggerProvider with an OTLP exporter. This is the same regardless of which logger you use.
otel-logging.js
Configure the log bridge
Set resource attributes
Resource attributes are attached to every log record exported from this process. Two attributes drive how Bronto organises incoming logs:
These are set via the
Resource constructor in the provider setup above.
Complete example
app.js
Verify delivery
After running your application, check both signals in Bronto:- Logs: open the Search page and filter by the dataset name you set in
service.name— your log records should appear within a few seconds. - Traces: open the Explore Traces page and filter by the same
service.name— your spans should appear within a few seconds.
- The OTel Collector is running and reachable at the configured endpoint.
- The Collector’s pipeline includes a
logspipeline with anotlpreceiver and the Bronto exporter — see Connect Open Telemetry to Bronto. otel-logging.jsis required before any logger is created — theOpenTelemetryTransportV3picks up the globalLoggerProvideron instantiation.BatchLogRecordProcessorexports on a background timer — for short-lived scripts, callloggerProvider.shutdown()before exit to flush pending records.
Traces
Install tracing dependencies
Configure the tracer provider
otel-tracing.js
resource object used for logging so both signals share service.name and service.namespace.
Creating spans
trace_id and span_id attached via the OpenTelemetryTransportV3.
Complete example
app.js
GenAI semantic conventions
If your application calls an LLM (OpenAI, Anthropic, Amazon Bedrock, etc.), OpenTelemetry defines a dedicated set of GenAI semantic conventions —gen_ai.* attributes for model, token usage, and prompt/response content.
This page was verified on July 17, 2026. GenAI libraries and semantic conventions are evolving rapidly, so package configuration and emitted attributes can change between releases. Keep your instrumentation current and verify the fields emitted by the version you deploy.
Auto-instrumentation
Contrib packages instrument popular provider SDKs automatically. For OpenAI:@opentelemetry/instrumentation-aws-sdk implements the GenAI semantic conventions for Bedrock Runtime calls (Converse, InvokeModel), and is bundled in @opentelemetry/auto-instrumentations-node.
Experimental: capturing prompt and response content
For the contrib instrumentations, content capture is off by default and controlled by:OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental opt-in used by the Python instrumentations is not read by the JS contrib packages.)
Manual spans
Where no auto-instrumentation package exists for your provider, set thegen_ai.* attributes yourself:
gen_ai.input.messages / gen_ai.output.messages, and how to search and aggregate GenAI fields in Bronto.
Direct export to Bronto
If you are not using an OTel Collector, export directly to Bronto by replacing the exporter configurations with the Bronto OTLP endpoints and your API key:
See API Keys for how to create a key with ingestion permissions. No other changes to the rest of the setup are required.

