Skip to content

Commit

Permalink
fix new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Feb 17, 2024
1 parent 8b45d7b commit aa145f2
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


HTTP_REQUEST_HEADER_TEMPLATE = "http.request.header"

"""
HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.
Expand Down Expand Up @@ -62,7 +61,6 @@


HTTP_RESPONSE_HEADER_TEMPLATE = "http.response.header"

"""
HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@


CONTAINER_LABELS_TEMPLATE = "container.labels"

"""
Container labels, `<key>` being the label name, the value being the label value.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@


DB_ELASTICSEARCH_PATH_PARTS_TEMPLATE = "db.elasticsearch.path_parts"

"""
A dynamic value in the url path.
Note: Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.<key>`, where `<key>` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class DbMetrics:
The time it took to create a new connection
"""
@staticmethod

def create_db_client_connections_create_time(meter: Meter) -> Histogram:

return meter.create_histogram(
name="db.client.connections.create_time",
description="The time it took to create a new connection",
Expand All @@ -42,9 +40,7 @@ def create_db_client_connections_create_time(meter: Meter) -> Histogram:
The maximum number of idle open connections allowed
"""
@staticmethod

def create_db_client_connections_idle_max(meter: Meter) -> UpDownCounter:

return meter.create_up_down_counter(
name="db.client.connections.idle.max",
description="The maximum number of idle open connections allowed",
Expand All @@ -56,9 +52,7 @@ def create_db_client_connections_idle_max(meter: Meter) -> UpDownCounter:
The minimum number of idle open connections allowed
"""
@staticmethod

def create_db_client_connections_idle_min(meter: Meter) -> UpDownCounter:

return meter.create_up_down_counter(
name="db.client.connections.idle.min",
description="The minimum number of idle open connections allowed",
Expand All @@ -70,9 +64,7 @@ def create_db_client_connections_idle_min(meter: Meter) -> UpDownCounter:
The maximum number of open connections allowed
"""
@staticmethod

def create_db_client_connections_max(meter: Meter) -> UpDownCounter:

return meter.create_up_down_counter(
name="db.client.connections.max",
description="The maximum number of open connections allowed",
Expand All @@ -84,9 +76,7 @@ def create_db_client_connections_max(meter: Meter) -> UpDownCounter:
The number of pending requests for an open connection, cumulative for the entire pool
"""
@staticmethod

def create_db_client_connections_pending_requests(meter: Meter) -> UpDownCounter:

return meter.create_up_down_counter(
name="db.client.connections.pending_requests",
description="The number of pending requests for an open connection, cumulative for the entire pool",
Expand All @@ -98,9 +88,7 @@ def create_db_client_connections_pending_requests(meter: Meter) -> UpDownCounter
The number of connection timeouts that have occurred trying to obtain a connection from the pool
"""
@staticmethod

def create_db_client_connections_timeouts(meter: Meter) -> Counter:

return meter.create_counter(
name="db.client.connections.timeouts",
description="The number of connection timeouts that have occurred trying to obtain a connection from the pool",
Expand All @@ -112,9 +100,7 @@ def create_db_client_connections_timeouts(meter: Meter) -> Counter:
The number of connections that are currently in state described by the `state` attribute
"""
@staticmethod

def create_db_client_connections_usage(meter: Meter) -> UpDownCounter:

return meter.create_up_down_counter(
name="db.client.connections.usage",
description="The number of connections that are currently in state described by the `state` attribute",
Expand All @@ -126,9 +112,7 @@ def create_db_client_connections_usage(meter: Meter) -> UpDownCounter:
The time between borrowing a connection and returning it to the pool
"""
@staticmethod

def create_db_client_connections_use_time(meter: Meter) -> Histogram:

return meter.create_histogram(
name="db.client.connections.use_time",
description="The time between borrowing a connection and returning it to the pool",
Expand All @@ -140,9 +124,7 @@ def create_db_client_connections_use_time(meter: Meter) -> Histogram:
The time it took to obtain an open connection from the pool
"""
@staticmethod

def create_db_client_connections_wait_time(meter: Meter) -> Histogram:

return meter.create_histogram(
name="db.client.connections.wait_time",
description="The time it took to obtain an open connection from the pool",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class FaasMetrics:
Number of invocation cold starts
"""
@staticmethod

def create_faas_coldstarts(meter: Meter) -> Counter:

return meter.create_counter(
name="faas.coldstarts",
description="Number of invocation cold starts",
Expand All @@ -42,9 +40,7 @@ def create_faas_coldstarts(meter: Meter) -> Counter:
Distribution of CPU usage per invocation
"""
@staticmethod

def create_faas_cpu_usage(meter: Meter) -> Histogram:

return meter.create_histogram(
name="faas.cpu_usage",
description="Distribution of CPU usage per invocation",
Expand All @@ -56,9 +52,7 @@ def create_faas_cpu_usage(meter: Meter) -> Histogram:
Number of invocation errors
"""
@staticmethod

def create_faas_errors(meter: Meter) -> Counter:

return meter.create_counter(
name="faas.errors",
description="Number of invocation errors",
Expand All @@ -70,9 +64,7 @@ def create_faas_errors(meter: Meter) -> Counter:
Measures the duration of the function's initialization, such as a cold start
"""
@staticmethod

def create_faas_init_duration(meter: Meter) -> Histogram:

return meter.create_histogram(
name="faas.init_duration",
description="Measures the duration of the function's initialization, such as a cold start",
Expand All @@ -84,9 +76,7 @@ def create_faas_init_duration(meter: Meter) -> Histogram:
Number of successful invocations
"""
@staticmethod

def create_faas_invocations(meter: Meter) -> Counter:

return meter.create_counter(
name="faas.invocations",
description="Number of successful invocations",
Expand All @@ -98,9 +88,7 @@ def create_faas_invocations(meter: Meter) -> Counter:
Measures the duration of the function's logic execution
"""
@staticmethod

def create_faas_invoke_duration(meter: Meter) -> Histogram:

return meter.create_histogram(
name="faas.invoke_duration",
description="Measures the duration of the function's logic execution",
Expand All @@ -112,9 +100,7 @@ def create_faas_invoke_duration(meter: Meter) -> Histogram:
Distribution of max memory usage per invocation
"""
@staticmethod

def create_faas_mem_usage(meter: Meter) -> Histogram:

return meter.create_histogram(
name="faas.mem_usage",
description="Distribution of max memory usage per invocation",
Expand All @@ -126,9 +112,7 @@ def create_faas_mem_usage(meter: Meter) -> Histogram:
Distribution of net I/O usage per invocation
"""
@staticmethod

def create_faas_net_io(meter: Meter) -> Histogram:

return meter.create_histogram(
name="faas.net_io",
description="Distribution of net I/O usage per invocation",
Expand All @@ -140,9 +124,7 @@ def create_faas_net_io(meter: Meter) -> Histogram:
Number of invocation timeouts
"""
@staticmethod

def create_faas_timeouts(meter: Meter) -> Counter:

return meter.create_counter(
name="faas.timeouts",
description="Number of invocation timeouts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class HttpMetrics:
Size of HTTP client request bodies
"""
@staticmethod

def create_http_client_request_body_size(meter: Meter) -> Histogram:

return meter.create_histogram(
name="http.client.request.body.size",
description="Size of HTTP client request bodies.",
Expand All @@ -42,9 +40,7 @@ def create_http_client_request_body_size(meter: Meter) -> Histogram:
Duration of HTTP client requests
"""
@staticmethod

def create_http_client_request_duration(meter: Meter) -> Histogram:

return meter.create_histogram(
name="http.client.request.duration",
description="Duration of HTTP client requests.",
Expand All @@ -56,9 +52,7 @@ def create_http_client_request_duration(meter: Meter) -> Histogram:
Size of HTTP client response bodies
"""
@staticmethod

def create_http_client_response_body_size(meter: Meter) -> Histogram:

return meter.create_histogram(
name="http.client.response.body.size",
description="Size of HTTP client response bodies.",
Expand All @@ -70,9 +64,7 @@ def create_http_client_response_body_size(meter: Meter) -> Histogram:
Number of active HTTP server requests
"""
@staticmethod

def create_http_server_active_requests(meter: Meter) -> UpDownCounter:

return meter.create_up_down_counter(
name="http.server.active_requests",
description="Number of active HTTP server requests.",
Expand All @@ -84,9 +76,7 @@ def create_http_server_active_requests(meter: Meter) -> UpDownCounter:
Size of HTTP server request bodies
"""
@staticmethod

def create_http_server_request_body_size(meter: Meter) -> Histogram:

return meter.create_histogram(
name="http.server.request.body.size",
description="Size of HTTP server request bodies.",
Expand All @@ -98,9 +88,7 @@ def create_http_server_request_body_size(meter: Meter) -> Histogram:
Duration of HTTP server requests
"""
@staticmethod

def create_http_server_request_duration(meter: Meter) -> Histogram:

return meter.create_histogram(
name="http.server.request.duration",
description="Duration of HTTP server requests.",
Expand All @@ -112,9 +100,7 @@ def create_http_server_request_duration(meter: Meter) -> Histogram:
Size of HTTP server response bodies
"""
@staticmethod

def create_http_server_response_body_size(meter: Meter) -> Histogram:

return meter.create_histogram(
name="http.server.response.body.size",
description="Size of HTTP server response bodies.",
Expand Down
Loading

0 comments on commit aa145f2

Please sign in to comment.