Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
add the supported list
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry committed Jul 26, 2024
1 parent 497b117 commit 91511c7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/charms/tempo_k8s/v2/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,16 @@ def __init__(self, *args):
DEFAULT_RELATION_NAME = "tracing"
RELATION_INTERFACE_NAME = "tracing"

# Supported list rationale https://github.com/canonical/tempo-coordinator-k8s-operator/issues/8
ReceiverProtocol = Literal[
"zipkin",
"otlp_grpc",
"otlp_http",
"opencensus",
"jaeger_grpc",
"jaeger_thrift_http",
"jaeger_thrift_compact",
"jaeger_thrift_binary",
]

RawReceiver = Tuple[ReceiverProtocol, str]
Expand All @@ -135,12 +141,18 @@ class TransportProtocolType(str, enum.Enum):

http = "http"
grpc = "grpc"
udp = "udp"


receiver_protocol_to_transport_protocol: Dict[ReceiverProtocol, TransportProtocolType] = {
"zipkin": TransportProtocolType.http,
"otlp_grpc": TransportProtocolType.grpc,
"otlp_http": TransportProtocolType.http,
"opencensus": TransportProtocolType.grpc,
"jaeger_thrift_http": TransportProtocolType.http,
"jaeger_grpc": TransportProtocolType.grpc,
"jaeger_thrift_compact": TransportProtocolType.udp,
"jaeger_thrift_binary": TransportProtocolType.udp,
}
"""A mapping between telemetry protocols and their corresponding transport protocol.
"""
Expand Down

0 comments on commit 91511c7

Please sign in to comment.