Monitoring
OpenTelemetry
Bugzor accepts OpenTelemetry traces and logs over OTLP/HTTP, next to the errors, logs and traces your Sentry SDKs send. OpenTelemetry data shows up on the same Traces and Logs pages, is linked to your issues, and is readable by AI agents through the MCP server. Use the standard OpenTelemetry exporters: there is nothing Bugzor-specific to install.
What you need#
- A project in Bugzor. Its public key is the part of the DSN before the
@(for examplehttps://0123456789abcdef0123456789abcdef@www.bugzor.com/42→0123456789abcdef0123456789abcdef). Copy it under Settings → Projects & keys; one key sends to one project, and each service’sservice.nametells senders apart inside it. - A plan that includes OpenTelemetry (below).
- An exporter set to
http/protobuf(JSON works too). OTLP over gRPC is not available yet.
Endpoint and key#
| Setting | Value |
|---|---|
| Endpoint | https://otlp.bugzor.com (the SDK adds /v1/traces and /v1/logs itself) |
| Protocol | http/protobuf (or http/json) |
| Key | the project’s public key, as the header x-bugzor-key (or Authorization: Bearer <key>) |
The same settings work for every language, as environment variables:
export OTEL_SERVICE_NAME=checkout
export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.bugzor.com
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS=x-bugzor-key=<public-key>
export OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=production,service.version=1.4.2
export OTEL_METRICS_EXPORTER=none # metrics are not stored yetservice.version becomes the release and deployment.environment.name the environment on traces, logs and issues.
Python#
pip install opentelemetry-distro opentelemetry-exporter-otlp-proto-http
opentelemetry-bootstrap -a install # installs the instrumentation for the libraries you useRun your app through the OpenTelemetry launcher, with the environment variables above (plus OTEL_LOGS_EXPORTER=otlp and
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true to send logs):
opentelemetry-instrument python app.pyWithout the launcher, set up the exporter in code:
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
provider = TracerProvider() # the OTEL_* variables above configure the resource
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter())) # endpoint and key come from the variables
trace.set_tracer_provider(provider)Node.js#
npm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node// instrumentation.js
const { NodeSDK } = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
new NodeSDK({ instrumentations: [getNodeAutoInstrumentations()] }).start();node --require ./instrumentation.js app.jsThe exporter reads the OTEL_EXPORTER_OTLP_* variables above. To send logs, add a logger provider with the OTLP log exporter as the
OpenTelemetry JavaScript documentation describes: Bugzor receives them at /v1/logs like any OTLP logs.
Go#
go get go.opentelemetry.io/otel/sdk go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttpimport (
"context"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
func initTracing(ctx context.Context) (func(context.Context) error, error) {
exporter, err := otlptracehttp.New(ctx) // reads OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS
if err != nil {
return nil, err
}
provider := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter)) // OTEL_SERVICE_NAME names the service
otel.SetTracerProvider(provider)
return provider.Shutdown, nil
}Call the returned function when the program exits so the last batch is sent.
Java#
Use the OpenTelemetry Java agent: no code changes.
curl -L -O https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
java -javaagent:opentelemetry-javaagent.jar -jar app.jarWith the environment variables above set, the agent sends traces, and logs once OTEL_LOGS_EXPORTER=otlp is set. Spring Boot, Quarkus, Micronaut and plain servlet apps are
instrumented automatically.
Check that it works#
curl -i -X POST https://otlp.bugzor.com/v1/traces \
-H 'x-bugzor-key: <public-key>' -H 'content-type: application/json' \
-d '{"resourceSpans":[]}'200 with {} means it works. 401 means the key is wrong; 403 means the plan does not include OpenTelemetry (or the key is disabled). Then run your service and open Traces in Bugzor.
Plans, storage and retention#
OpenTelemetry is part of the plans below. Logs and traces from OpenTelemetry and from Sentry SDKs share your plan’s storage and are kept for the plan’s retention; both are shown under Settings → Billing & usage, with what fills the storage (traces, span events and links, logs).
| Plan | OpenTelemetry | Storage for logs and traces | Kept for |
|---|---|---|---|
| Leaf | Not included | - | - |
| LongNeck | Included | 5 GB | 30 days |
| Zilla | Included | 20 GB | 90 days |
Without OpenTelemetry in the plan, requests are answered 403 with a message that names the plan; your Sentry SDK data is not affected.
When storage is full, new logs and traces (OpenTelemetry included) are refused until older data expires or you change plan; Bugzor
accepts the request and reports what it dropped in the response, so exporters do not retry. Billing contacts get an email at 80% and when it is full.
Storage fills fast at high volume: OpenTelemetry services often emit hundreds of spans a second. Sample before you send, for example
OTEL_TRACES_SAMPLER=parentbased_traceidratio with OTEL_TRACES_SAMPLER_ARG=0.1 keeps one trace in ten. Limits and notification thresholds are also described in Rate limits & quotas.
What Bugzor stores#
- Spans with their service, kind (server, client, producer, consumer, internal), status, timing and attributes; the service’s entry
spans are your transactions. Span events (including
exceptionevents) and links are kept with the trace. - Logs with severity, body, trace and span ids, and attributes.
- Attributes keep their type: a number stays a number, a boolean a boolean, so agents and filters see
status_code: 200, not"200". Resource attributes appear asresource.*and the instrumentation scope asscope.*. - Metrics are not stored yet. Set
OTEL_METRICS_EXPORTER=none; metric requests are answered with a note that they are not supported.
Before anything is stored, Bugzor redacts the values of attributes whose names look like credentials (authorization, cookie,
password, secret, token, API keys), the values in URL query strings, and the literals in SQL statements (WHERE id = ?).
Keep other sensitive data out of attributes at the source. Records are limited to 128 attributes, keys to 128 bytes and values to 8 KiB.
Exceptions as issues#
Exceptions recorded on spans (the exception event) and error logs with exception.* attributes can become issues, grouped and
linked to their trace like errors from a Sentry SDK. It is off by default; owners and admins turn it on per project under Settings →
Projects & keys → (project) → OpenTelemetry exceptions:
- Unhandled exceptions and failed spans: exceptions that escaped their span or ended a failed span, and error logs with an exception.
- Every exception: handled ones too.
Stack traces are read for Python, Java, Node.js, Go, Ruby and .NET; other formats are kept as text and group by type and message. These issues count as errors against the project’s monthly error quota, at most 100 are created from one request, and the same failure in one trace becomes one event.
Limits and responses#
| Limit | Value |
|---|---|
| Request size | 4 MB as sent (compressed), 32 MB after decompression; send gzip |
| Rate | a byte budget per project; above it, 429 with Retry-After, which exporters retry |
| Wrong key | 401; disabled key or suspended workspace: 403 |
| Not in the plan | 403 naming the plan |
| Storage full, or an unsupported signal (metrics) | 200 with partial_success and the number rejected |
| Malformed request | 400 (not retried) |
Exporters batch for you; the defaults of the OpenTelemetry SDKs (a few hundred spans per request) fit well within these limits.
Something unclear or out of date? Tell us.