From c9061860113fde5f1d3cf8b34c256c98ac7881af Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 6 Apr 2024 22:03:56 +0300 Subject: [PATCH] add semconv package Signed-off-by: Vasiliy Tolstov --- semconv/broker.go | 20 ++++++++++++++++++++ semconv/client.go | 12 ++++++++++++ semconv/server.go | 12 ++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 semconv/broker.go create mode 100644 semconv/client.go create mode 100644 semconv/server.go diff --git a/semconv/broker.go b/semconv/broker.go new file mode 100644 index 00000000..9b61b523 --- /dev/null +++ b/semconv/broker.go @@ -0,0 +1,20 @@ +package semconv + +var ( + // PublishMessageDurationSeconds specifies meter metric name + PublishMessageDurationSeconds = "publish_message_duration_seconds" + // PublishMessageLatencyMicroseconds specifies meter metric name + PublishMessageLatencyMicroseconds = "publish_message_latency_microseconds" + // PublishMessageTotal specifies meter metric name + PublishMessageTotal = "publish_message_total" + // PublishMessageInflight specifies meter metric name + PublishMessageInflight = "publish_message_inflight" + // SubscribeMessageDurationSeconds specifies meter metric name + SubscribeMessageDurationSeconds = "subscribe_message_duration_seconds" + // SubscribeMessageLatencyMicroseconds specifies meter metric name + SubscribeMessageLatencyMicroseconds = "subscribe_message_latency_microseconds" + // SubscribeMessageTotal specifies meter metric name + SubscribeMessageTotal = "subscribe_message_total" + // SubscribeMessageInflight specifies meter metric name + SubscribeMessageInflight = "subscribe_message_inflight" +) diff --git a/semconv/client.go b/semconv/client.go new file mode 100644 index 00000000..96671471 --- /dev/null +++ b/semconv/client.go @@ -0,0 +1,12 @@ +package semconv + +var ( + // ClientRequestDurationSeconds specifies meter metric name + ClientRequestDurationSeconds = "client_request_duration_seconds" + // ClientRequestLatencyMicroseconds specifies meter metric name + ClientRequestLatencyMicroseconds = "client_request_latency_microseconds" + // ClientRequestTotal specifies meter metric name + ClientRequestTotal = "client_request_total" + // ClientRequestInflight specifies meter metric name + ClientRequestInflight = "client_request_inflight" +) diff --git a/semconv/server.go b/semconv/server.go new file mode 100644 index 00000000..fedb7074 --- /dev/null +++ b/semconv/server.go @@ -0,0 +1,12 @@ +package semconv + +var ( + // ServerRequestDurationSeconds specifies meter metric name + ServerRequestDurationSeconds = "server_request_duration_seconds" + // ServerRequestLatencyMicroseconds specifies meter metric name + ServerRequestLatencyMicroseconds = "server_request_latency_microseconds" + // ServerRequestTotal specifies meter metric name + ServerRequestTotal = "server_request_total" + // ServerRequestInflight specifies meter metric name + ServerRequestInflight = "server_request_inflight" +)