{% extends "base.html" %} {% block title %}{{ _('OTEL diagnostics') }} — mcprack{% endblock %} {% block content %}

{{ _('OpenTelemetry diagnostics') }}

{{ _('Status of tracing/metrics export, and an on-demand test signal — see') }} {{ _('README "Observability"') }} {{ _('for how to configure this.') }}

  1. {% if state.enabled %}✓{% else %}―{% endif %}
    OTEL_ENABLED
    {% if state.enabled %} {{ _('Enabled — traces and metrics are being exported.') }} {% else %} {{ _('Disabled (no-op) — set OTEL_ENABLED=true in /etc/mcprack/env and restart the service to turn this on.') }} {% if state.init_error %}
    {{ _('Last initialization error: %(error)s', error=state.init_error) }}{% endif %} {% endif %}
  2. {% if state.endpoint %}✓{% else %}✗{% endif %}
    OTEL_EXPORTER_OTLP_ENDPOINT
    {% if state.endpoint %}{{ state.endpoint }}{% else %}{{ _('Not set.') }}{% endif %}
  3. {% if state.protocol_fell_back %}⚠{% elif state.effective_protocol %}✓{% else %}―{% endif %}
    {{ _('Protocol') }}
    {% if state.effective_protocol %} {{ _('Using %(protocol)s', protocol=state.effective_protocol) }} {% if state.protocol_fell_back %} {{ _('— fell back from requested %(protocol)s.', protocol=state.requested_protocol) }} {% if state.requested_protocol and state.requested_protocol|lower == 'http/json' %} {{ _('The Python OTLP exporter has no http/json transport (unlike the JS SDK) — only grpc and http/protobuf are supported.') }} {% endif %} {% endif %} {% else %} {{ _('Not initialized.') }} {% endif %}
  4. {% if state.service_name %}✓{% else %}―{% endif %}
    {{ _('Service name') }}
    {{ state.service_name }}

{{ _('Test connectivity') }}

{{ _('Sends one test span and one test metric point and force-flushes them — this proves the exporter can talk to %(endpoint)s without raising, but a "success" here does not guarantee the Collector actually stored the data (that background export path does not surface errors synchronously).', endpoint=state.endpoint or _('(no endpoint configured)')) }}

{% if not state.enabled %}

{{ _('Requires OTEL_ENABLED=true.') }}

{% endif %}

{{ _('Re-run diagnostics') }}

{% endblock %}