AddOpenTelemetry() block sends logs, metrics, and traces from your .NET application to Bronto. Existing ILogger calls feed the log pipeline, instruments feed the meter provider, and activities feed the tracer provider — all three sharing one resource identity and one OTLP exporter.
The application exports to an OpenTelemetry Collector, which forwards to Bronto. If you don’t run a Collector, export directly to Bronto instead — only the endpoint and an API key header change.
Prerequisites
- .NET 8 or later
- An OTel Collector reachable from your application, with
logs,metrics, andtracespipelines forwarding to Bronto — see Connect OpenTelemetry Collector to Bronto
Install dependencies
Initialise the SDK
Configure all three signals inProgram.cs:
Program.cs
UseOtlpExporter enables the exporter for logs, metrics, and traces in one call, appending the signal path (/v1/logs, /v1/metrics, /v1/traces) to the base URL. ConfigureResource applies across all three signals, so service.name and service.namespace are shared automatically.
Two resource attributes determine how Bronto organises your data:
http://localhost:4318 is the standard OTLP/HTTP address for a Collector on the same host. Use the address reachable from your application if the Collector runs in another container, pod, or host. No authentication is needed between the application and the Collector — the Collector holds the Bronto API key.For console applications and workers, use
Host.CreateApplicationBuilder(args) in place of WebApplication.CreateBuilder(args). The AddOpenTelemetry() block is identical.Instrument your application
ILogger calls need no changes. Add a Meter and an ActivitySource for your own measurements and spans:
AddSource and AddMeter names in Program.cs must match the ActivitySource and Meter names here, or their telemetry is dropped.
Any ILogger call made inside an active Activity automatically carries that span’s trace_id and span_id, so you can jump from a log line to its trace in Bronto with no manual context propagation.
Verify
Run your application, then check each signal in Bronto, filtering by theservice.name you set:
- Logs — the Search page, in the dataset named after your service
- Metrics — the Metric Explorer
- Traces — the Explore Traces page
- Confirm the Collector is running and reachable at the configured endpoint, and that its pipelines include an
otlpreceiver and the Bronto exporters. - Confirm
OtlpExportProtocol.HttpProtobufmatches the Collector receiver you are pointing at — port4318is HTTP,4317is gRPC. - Check that every
ActivitySourceandMetername is registered withAddSource/AddMeter.
Direct export to Bronto
Without a Collector, the application exports straight to Bronto over OTLP/HTTP. Point the base URL at your Bronto region:Program.cs
UseOtlpExporter reads:
See API Keys for how to create a key with ingestion permissions.
GenAI semantic conventions
If your application calls an LLM, OpenTelemetry’s GenAI semantic conventions definegen_ai.* span attributes for model, token usage, and prompt and response content.
.NET GenAI telemetry is library-specific — each has its own opt-in, and each emits from its own activity source, which you register with AddSource:
These APIs are experimental and version-sensitive, so verify the attributes emitted by the version you deploy against each library’s current documentation.
Capture prompts and responses
Content capture is controlled by the .NET library rather than the cross-language OTel variables —OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT, used by the Python, JavaScript, and Java instrumentations, is not a .NET-wide switch. Semantic Kernel uses its own sensitive-diagnostics opt-in:
EnableSensitiveData option on UseOpenTelemetry() instead. Prompt and response content can contain sensitive data, so enable it deliberately.

