Class BowireOtlpProtocol
- Namespace
- Kuestenlogik.Bowire.Protocol.Otlp
- Assembly
- Kuestenlogik.Bowire.Protocol.Otlp.dll
Bowire protocol plugin for the OpenTelemetry Protocol (OTLP) in
passive listener mode — the workbench opens an OTLP receiver
and SUTs export to it via
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:<port>.
Every received export surfaces here channel-style so operators can
inspect traces / metrics / logs alongside their invokes.
public sealed class BowireOtlpProtocol : IBowireProtocol
- Inheritance
-
BowireOtlpProtocol
- Implements
- Inherited Members
Remarks
Phase 1 receives both application/json and the OTLP-default
application/x-protobuf: JSON is forwarded verbatim, protobuf
is captured as base64 with the wire-level metadata. Phase 2 swaps
the base64 branch for an inline decode via vendored
opentelemetry-proto descriptors.
The plugin doesn't make outbound calls — serverUrl is read
only as the discovery anchor for the workbench's per-URL grouping.
InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken) returns the most recent envelope of the
requested kind; InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken) subscribes to the
envelope-store publish/subscribe channel and yields each export as
it arrives.
Constructors
BowireOtlpProtocol()
public BowireOtlpProtocol()
Properties
Description
One-line description shown next to the plugin's display name
in Settings → Plugins. Optional; defaults to empty so
the row falls back to "DisplayName + version" without the
description line. Keep it short (≤ 100 characters) — the row
truncates anything wider than the manage panel.
public string Description { get; }
Property Value
IconSvg
SVG icon for the protocol tab.
public string IconSvg { get; }
Property Value
Id
Short identifier (e.g., "grpc", "signalr").
public string Id { get; }
Property Value
Name
Protocol name shown in UI tabs.
public string Name { get; }
Property Value
Methods
DiscoverAsync(string, bool, CancellationToken)
Discovery surfaces a single virtual service OtlpReceiver
with three methods — one per OTLP signal. Each method is marked
ServerStreaming so the workbench's channel UX picks the
right shape (receive-only stream of envelopes).
public Task<List<BowireServiceInfo>> DiscoverAsync(string serverUrl, bool showInternalServices, CancellationToken ct = default)
Parameters
serverUrlstringshowInternalServicesboolctCancellationToken
Returns
Initialize(IServiceProvider?)
Called after registration to inject the app's service provider (embedded mode).
public void Initialize(IServiceProvider? serviceProvider)
Parameters
serviceProviderIServiceProvider
InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)
Returns the most recently received envelope of the kind named
by method. Treat this as "snapshot the
current state" — for live streaming use
InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken).
public Task<InvokeResult> InvokeAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
serverUrlstringservicestringmethodstringjsonMessagesList<string>showInternalServicesboolmetadataDictionary<string, string>ctCancellationToken
Returns
InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)
Subscribes to the envelope-store publish/subscribe channel and
yields each newly received envelope (filtered by signal kind)
as a JSON string. The stream stays open until ct
is cancelled.
public IAsyncEnumerable<string> InvokeStreamAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
serverUrlstringservicestringmethodstringjsonMessagesList<string>showInternalServicesboolmetadataDictionary<string, string>ctCancellationToken
Returns
OpenChannelAsync(string, string, string, bool, Dictionary<string, string>?, CancellationToken)
OTLP is receive-only — there's no bidirectional channel to open. The workbench's stream surface (InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)) covers the live-tail case.
public Task<IBowireChannel?> OpenChannelAsync(string serverUrl, string service, string method, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
serverUrlstringservicestringmethodstringshowInternalServicesboolmetadataDictionary<string, string>ctCancellationToken