Skip to content

Commit

Permalink
Merge branch 'main' into feat/rpc-metrics-yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Jun 20, 2023
2 parents 9124325 + 156f942 commit 65ae09d
Show file tree
Hide file tree
Showing 17 changed files with 251 additions and 199 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,14 @@ release.
([#69](https://github.com/open-telemetry/semantic-conventions/pull/69))
- Clarify when HTTP client spans should end.
([#70](https://github.com/open-telemetry/semantic-conventions/pull/70))
- Clarify that OTEL_SEMCONV_STABILITY_OPT_IN is a comma-separated list of values
([#104](https://github.com/open-telemetry/semantic-conventions/pull/104))
- Add `process.runtime.jvm.cpu.time` metric.
([#55](https://github.com/open-telemetry/semantic-conventions/pull/55))
- Split out sections for proposed stable JVM metrics and experimental JVM metrics.
([#56](https://github.com/open-telemetry/semantic-conventions/pull/56))
- Make `url.query` conditionally required for HTTP spans.
([#118](https://github.com/open-telemetry/semantic-conventions/pull/118))
- Change `server.address` and `server.port` requirement levels on HTTP server metrics
from `required` to `opt_in`.
([#109](https://github.com/open-telemetry/semantic-conventions/pull/109))
3 changes: 0 additions & 3 deletions semantic_conventions/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ groups:
SHOULD include the [application root](/specification/trace/semantic_conventions/http.md#http-server-definitions) if there is one.
- ref: server.address
requirement_level: required
brief: >
Name of the local HTTP server that received the request.
note: |
Expand All @@ -80,8 +79,6 @@ groups:
SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup.
- ref: server.port
requirement_level:
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
brief: >
Port of the local HTTP server that received the request.
note: |
Expand Down
104 changes: 57 additions & 47 deletions semantic_conventions/metrics/http.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,60 @@
groups:
- id: metric.http.server.duration
type: metric
metric_name: http.server.duration
brief: "Measures the duration of inbound HTTP requests."
instrument: histogram
unit: "s"
- id: metric_attributes.http.server
type: attribute_group
brief: 'HTTP server attributes'
extends: attributes.http.server
attributes:
- ref: server.address
brief: >
Name of the local HTTP server that received the request.
requirement_level: opt_in
note: |
Determined by using the first of the following that applies
- The [primary server name](/specification/trace/semantic_conventions/http.md#http-server-definitions) of the matched virtual host. MUST only
include host identifier.
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
if it's sent in absolute-form.
- Host identifier of the `Host` header
SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup.
- ref: server.port
brief: >
Port of the local HTTP server that received the request.
requirement_level: opt_in
note: |
Determined by using the first of the following that applies
- Port identifier of the [primary server host](/specification/trace/semantic_conventions/http.md#http-server-definitions) of the matched virtual host.
- Port identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
if it's sent in absolute-form.
- Port identifier of the `Host` header
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric_attributes.http.client
type: attribute_group
brief: 'HTTP client attributes'
extends: attributes.http.client
attributes:
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address

- id: metric.http.server.duration
type: metric
metric_name: http.server.duration
brief: "Measures the duration of inbound HTTP requests."
instrument: histogram
unit: "s"
extends: metric_attributes.http.server

- id: metric.http.server.active_requests
type: metric
Expand All @@ -25,7 +68,7 @@ groups:
requirement_level: required
examples: ["http", "https"]
- ref: server.address
requirement_level: required
requirement_level: opt_in
brief: >
Name of the local HTTP server that received the request.
note: |
Expand All @@ -40,8 +83,7 @@ groups:
SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup.
- ref: server.port
requirement_level:
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
requirement_level: opt_in
brief: >
Port of the local HTTP server that received the request.
note: |
Expand All @@ -58,68 +100,36 @@ groups:
brief: "Measures the size of HTTP request messages (compressed)."
instrument: histogram
unit: "By"
extends: attributes.http.server
# TODO (trask) below attributes are identical to above in metric.http.server.duration
attributes:
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version
extends: metric_attributes.http.server

- id: metric.http.server.response.size
type: metric
metric_name: http.server.response.size
brief: "Measures the size of HTTP response messages (compressed)."
instrument: histogram
unit: "By"
extends: attributes.http.server
# TODO (trask) below attributes are identical to above in metric.http.server.duration
attributes:
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version
extends: metric_attributes.http.server

- id: metric.http.client.duration
type: metric
metric_name: http.client.duration
brief: "Measures the duration of outbound HTTP requests."
instrument: histogram
unit: "s"
extends: attributes.http.client
attributes:
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address
extends: metric_attributes.http.client

- id: metric.http.client.request.size
type: metric
metric_name: http.client.request.size
brief: "Measures the size of HTTP request messages (compressed)."
instrument: histogram
unit: "By"
extends: attributes.http.client
# TODO (trask) below attributes are identical to above in metric.http.client.duration
attributes:
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address
extends: metric_attributes.http.client

- id: metric.http.client.response.size
type: metric
metric_name: http.client.response.size
brief: "Measures the size of HTTP response messages (compressed)."
instrument: histogram
unit: "By"
extends: attributes.http.client
# TODO (trask) below attributes are identical to above in metric.http.client.duration
attributes:
- ref: http.request.method
- ref: http.response.status_code
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address
extends: metric_attributes.http.client
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
groups:
- id: metric.process.runtime.jvm.memory.init
type: metric
metric_name: process.runtime.jvm.memory.init
extends: attributes.process.runtime.jvm.memory
brief: "Measure of initial memory requested."
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.system.cpu.utilization
type: metric
metric_name: process.runtime.jvm.system.cpu.utilization
brief: "Recent CPU utilization for the whole system."
note: >
The value range is [0.0,1.0].
This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()).
instrument: gauge
unit: "1"

- id: metric.process.runtime.jvm.system.cpu.load_1m
type: metric
metric_name: process.runtime.jvm.system.cpu.load_1m
brief: "Average CPU load of the whole system for the last minute."
note: >
The value range is [0,n], where n is the number of CPU cores - or a negative number if the value is not available.
This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()).
instrument: gauge
unit: "1"

- id: attributes.process.runtime.jvm.buffer
type: attribute_group
brief: "Describes JVM buffer metric attributes."
attributes:
- ref: pool
brief: Name of the buffer pool.
examples: [ "mapped", "direct" ]
note: >
Pool names are generally obtained via
[BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
- id: metric.process.runtime.jvm.buffer.usage
type: metric
metric_name: process.runtime.jvm.buffer.usage
extends: attributes.process.runtime.jvm.buffer
brief: "Measure of memory used by buffers."
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.buffer.limit
type: metric
metric_name: process.runtime.jvm.buffer.limit
extends: attributes.process.runtime.jvm.buffer
brief: "Measure of total memory capacity of buffers."
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.buffer.count
type: metric
metric_name: process.runtime.jvm.buffer.count
extends: attributes.process.runtime.jvm.buffer
brief: "Number of buffers in the pool."
instrument: updowncounter
unit: "{buffer}"
74 changes: 7 additions & 67 deletions semantic_conventions/metrics/process-runtime-jvm-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ groups:
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.memory.init
type: metric
metric_name: process.runtime.jvm.memory.init
extends: attributes.process.runtime.jvm.memory
brief: "Measure of initial memory requested."
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.memory.committed
type: metric
metric_name: process.runtime.jvm.memory.committed
Expand Down Expand Up @@ -122,6 +114,13 @@ groups:
instrument: updowncounter
unit: "{class}"

- id: metric.process.runtime.jvm.cpu.time
type: metric
metric_name: process.runtime.jvm.cpu.time
brief: "CPU time used by the process."
instrument: counter
unit: "s"

- id: metric.process.runtime.jvm.cpu.recent_utilization
type: metric
metric_name: process.runtime.jvm.cpu.recent_utilization
Expand All @@ -133,62 +132,3 @@ groups:
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()).
instrument: gauge
unit: "1"

- id: metric.process.runtime.jvm.system.cpu.utilization
type: metric
metric_name: process.runtime.jvm.system.cpu.utilization
brief: "Recent CPU utilization for the whole system."
note: >
The value range is [0.0,1.0].
This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()).
instrument: gauge
unit: "1"

- id: metric.process.runtime.jvm.system.cpu.load_1m
type: metric
metric_name: process.runtime.jvm.system.cpu.load_1m
brief: "Average CPU load of the whole system for the last minute."
note: >
The value range is [0,n], where n is the number of CPU cores - or a negative number of the value is not available.
This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()).
instrument: gauge
unit: "1"

- id: attributes.process.runtime.jvm.buffer
type: attribute_group
brief: "Describes JVM buffer metric attributes."
attributes:
- ref: pool
brief: Name of the buffer pool.
examples: [ "mapped", "direct" ]
note: >
Pool names are generally obtained via
[BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
- id: metric.process.runtime.jvm.buffer.usage
type: metric
metric_name: process.runtime.jvm.buffer.usage
extends: attributes.process.runtime.jvm.buffer
brief: "Measure of memory used by buffers."
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.buffer.limit
type: metric
metric_name: process.runtime.jvm.buffer.limit
extends: attributes.process.runtime.jvm.buffer
brief: "Measure of total memory capacity of buffers."
instrument: updowncounter
unit: "By"

- id: metric.process.runtime.jvm.buffer.count
type: metric
metric_name: process.runtime.jvm.buffer.count
extends: attributes.process.runtime.jvm.buffer
brief: "Number of buffers in the pool."
instrument: updowncounter
unit: "{buffer}"
6 changes: 5 additions & 1 deletion semantic_conventions/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ groups:
brief: The domain name of an immediate peer.
examples: ['proxy.example.com']
note: Typically observed from the client side, and represents a proxy or other intermediary domain name.
requirement_level:
recommended: If different than `server.address`.
- id: socket.address
type: string
brief: Physical server IP address or Unix socket address.
brief: >
Physical server IP address or Unix socket address. If set from the client, should simply use the socket's peer address, and not attempt to find any actual server IP (i.e., if set from
client, this may represent some proxy server instead of the logical server).
examples: ['10.5.3.2']
requirement_level:
recommended: If different than `server.address`.
Expand Down
2 changes: 2 additions & 0 deletions semantic_conventions/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ groups:
requirement_level: required
sampling_relevant: true
- ref: url.query
requirement_level:
conditionally_required: If and only if one was received/sent.
sampling_relevant: true
- ref: url.scheme
sampling_relevant: true
Expand Down
Loading

0 comments on commit 65ae09d

Please sign in to comment.