runtimeconditions-observability 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runtimeconditions_observability-0.2.0/MANIFEST.in +1 -0
- runtimeconditions_observability-0.2.0/PKG-INFO +94 -0
- runtimeconditions_observability-0.2.0/README.md +86 -0
- runtimeconditions_observability-0.2.0/pyproject.toml +23 -0
- runtimeconditions_observability-0.2.0/runtimeconditions.file-manifest.yaml +13 -0
- runtimeconditions_observability-0.2.0/setup.cfg +4 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/__init__.py +26 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/bindings.py +175 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/py.typed +0 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/runtimeconditions.binding-model.yaml +838 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/runtimeconditions.binding-release.yaml +39 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/runtimeconditions.bindings.yaml +204 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability/runtimeconditions.extension.yaml +168 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability.egg-info/PKG-INFO +94 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability.egg-info/SOURCES.txt +15 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability.egg-info/dependency_links.txt +1 -0
- runtimeconditions_observability-0.2.0/src/runtimeconditions_observability.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include runtimeconditions.file-manifest.yaml
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: runtimeconditions-observability
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Use this extension to say how the platform can see what your workload is doing: its traces, metrics and logs.
|
|
5
|
+
Project-URL: Repository, https://github.com/runtimeconditions/extensions
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
<!-- Code generated by runtimeconditions-binding-emitter 0.1.0 from model 4be77a5ea83ff14ba2cb09e6200bf2d599d96cbc91233036edc85a0813d2bddc; DO NOT EDIT. -->
|
|
10
|
+
|
|
11
|
+
# runtimeconditions-observability
|
|
12
|
+
|
|
13
|
+
Use this extension to say how the platform can see what your workload is doing: its traces, metrics and
|
|
14
|
+
logs.
|
|
15
|
+
|
|
16
|
+
There are two ways, and each one is an interface type:
|
|
17
|
+
|
|
18
|
+
- otlp_export: your workload sends its traces, metrics or logs to a receiver, using OpenTelemetry
|
|
19
|
+
(OTLP). The platform gives it a receiver to send to.
|
|
20
|
+
- prometheus_scrape: your workload shows its metrics on a web address, and a Prometheus server reads
|
|
21
|
+
them from time to time. The platform sets up the reading.
|
|
22
|
+
|
|
23
|
+
If your workload does both, add one Condition for each.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pip install runtimeconditions-observability
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Runtime Conditions extension: https://runtimeconditions.io/extensions/rc/observability/0.2.0/runtimeconditions.extension.yaml
|
|
30
|
+
|
|
31
|
+
## Conditions
|
|
32
|
+
|
|
33
|
+
Every Condition part this package defines, with the fields you can set. Select a line to open it.
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary><b>rc.observability</b> · <code>otlp_export</code>: Your workload sends telemetry to an OpenTelemetry (OTLP) receiver.</summary>
|
|
37
|
+
|
|
38
|
+
`OtlpExport` is the `interface` of a `rc.observability` Condition.
|
|
39
|
+
|
|
40
|
+
| Field | Type | Required | Description |
|
|
41
|
+
| --- | --- | --- | --- |
|
|
42
|
+
| `signals` | `Signals` | yes | The kinds of telemetry that your workload sends, such as traces, metrics and logs. At least one of traces, metrics and logs, each one once.<br>Values:<br>`logs`: Logs, which are the lines of text that your workload writes about what it does.<br>`metrics`: Metrics, which are numbers measured over time, such as the number of requests.<br>`traces`: Traces, which show how one request moves through your services. |
|
|
43
|
+
| `transport` | `Transport` | yes | How your workload sends the telemetry. The receiver must accept this way. grpc, http/protobuf or http/json. The receiver must accept it.<br>Values:<br>`grpc`: OTLP over gRPC, with the data in Protocol Buffers.<br>`http/json`: OTLP over HTTP, with the data in JSON.<br>`http/protobuf`: OTLP over HTTP, with the data in Protocol Buffers. |
|
|
44
|
+
|
|
45
|
+
</details>
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary><b>rc.observability</b> · <code>prometheus_scrape</code>: Your workload shows metrics that a Prometheus server can read.</summary>
|
|
49
|
+
|
|
50
|
+
`PrometheusScrape` is the `interface` of a `rc.observability` Condition.
|
|
51
|
+
|
|
52
|
+
| Field | Type | Required | Description |
|
|
53
|
+
| --- | --- | --- | --- |
|
|
54
|
+
| `path` | `str` | yes | The web path where your workload shows its metrics, such as /metrics. The web path. It must start with /. |
|
|
55
|
+
| `port` | `int` | yes | The TCP port where your workload shows its metrics. A TCP port, from 1 to 65535. |
|
|
56
|
+
| `scheme` | `Scheme` | yes | Whether Prometheus reads the metrics over http or https. http or https.<br>Values:<br>`http`: Read the metrics over plain HTTP.<br>`https`: Read the metrics over HTTPS. |
|
|
57
|
+
|
|
58
|
+
</details>
|
|
59
|
+
|
|
60
|
+
## rc_observability
|
|
61
|
+
|
|
62
|
+
`rc_observability` declares a `rc.observability` Condition.
|
|
63
|
+
|
|
64
|
+
Your workload sends telemetry to the platform, or shows telemetry that the platform must collect.
|
|
65
|
+
|
|
66
|
+
Example: a workload that sends its traces and logs with OpenTelemetry over gRPC.
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
from runtimeconditions_observability import (
|
|
70
|
+
OtlpExport,
|
|
71
|
+
SignalsItem,
|
|
72
|
+
Transport,
|
|
73
|
+
rc_observability,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
rc_observability(
|
|
77
|
+
OtlpExport(
|
|
78
|
+
signals=[SignalsItem.TRACES, SignalsItem.LOGS],
|
|
79
|
+
transport=Transport.GRPC,
|
|
80
|
+
),
|
|
81
|
+
)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
In a Profile, this declares:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
kind: rc.observability
|
|
88
|
+
interface:
|
|
89
|
+
type: otlp_export
|
|
90
|
+
signals: [traces, logs]
|
|
91
|
+
transport: grpc
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Every class, field and enum member is documented in the package's docstrings.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<!-- Code generated by runtimeconditions-binding-emitter 0.1.0 from model 4be77a5ea83ff14ba2cb09e6200bf2d599d96cbc91233036edc85a0813d2bddc; DO NOT EDIT. -->
|
|
2
|
+
|
|
3
|
+
# runtimeconditions-observability
|
|
4
|
+
|
|
5
|
+
Use this extension to say how the platform can see what your workload is doing: its traces, metrics and
|
|
6
|
+
logs.
|
|
7
|
+
|
|
8
|
+
There are two ways, and each one is an interface type:
|
|
9
|
+
|
|
10
|
+
- otlp_export: your workload sends its traces, metrics or logs to a receiver, using OpenTelemetry
|
|
11
|
+
(OTLP). The platform gives it a receiver to send to.
|
|
12
|
+
- prometheus_scrape: your workload shows its metrics on a web address, and a Prometheus server reads
|
|
13
|
+
them from time to time. The platform sets up the reading.
|
|
14
|
+
|
|
15
|
+
If your workload does both, add one Condition for each.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pip install runtimeconditions-observability
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Runtime Conditions extension: https://runtimeconditions.io/extensions/rc/observability/0.2.0/runtimeconditions.extension.yaml
|
|
22
|
+
|
|
23
|
+
## Conditions
|
|
24
|
+
|
|
25
|
+
Every Condition part this package defines, with the fields you can set. Select a line to open it.
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary><b>rc.observability</b> · <code>otlp_export</code>: Your workload sends telemetry to an OpenTelemetry (OTLP) receiver.</summary>
|
|
29
|
+
|
|
30
|
+
`OtlpExport` is the `interface` of a `rc.observability` Condition.
|
|
31
|
+
|
|
32
|
+
| Field | Type | Required | Description |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| `signals` | `Signals` | yes | The kinds of telemetry that your workload sends, such as traces, metrics and logs. At least one of traces, metrics and logs, each one once.<br>Values:<br>`logs`: Logs, which are the lines of text that your workload writes about what it does.<br>`metrics`: Metrics, which are numbers measured over time, such as the number of requests.<br>`traces`: Traces, which show how one request moves through your services. |
|
|
35
|
+
| `transport` | `Transport` | yes | How your workload sends the telemetry. The receiver must accept this way. grpc, http/protobuf or http/json. The receiver must accept it.<br>Values:<br>`grpc`: OTLP over gRPC, with the data in Protocol Buffers.<br>`http/json`: OTLP over HTTP, with the data in JSON.<br>`http/protobuf`: OTLP over HTTP, with the data in Protocol Buffers. |
|
|
36
|
+
|
|
37
|
+
</details>
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary><b>rc.observability</b> · <code>prometheus_scrape</code>: Your workload shows metrics that a Prometheus server can read.</summary>
|
|
41
|
+
|
|
42
|
+
`PrometheusScrape` is the `interface` of a `rc.observability` Condition.
|
|
43
|
+
|
|
44
|
+
| Field | Type | Required | Description |
|
|
45
|
+
| --- | --- | --- | --- |
|
|
46
|
+
| `path` | `str` | yes | The web path where your workload shows its metrics, such as /metrics. The web path. It must start with /. |
|
|
47
|
+
| `port` | `int` | yes | The TCP port where your workload shows its metrics. A TCP port, from 1 to 65535. |
|
|
48
|
+
| `scheme` | `Scheme` | yes | Whether Prometheus reads the metrics over http or https. http or https.<br>Values:<br>`http`: Read the metrics over plain HTTP.<br>`https`: Read the metrics over HTTPS. |
|
|
49
|
+
|
|
50
|
+
</details>
|
|
51
|
+
|
|
52
|
+
## rc_observability
|
|
53
|
+
|
|
54
|
+
`rc_observability` declares a `rc.observability` Condition.
|
|
55
|
+
|
|
56
|
+
Your workload sends telemetry to the platform, or shows telemetry that the platform must collect.
|
|
57
|
+
|
|
58
|
+
Example: a workload that sends its traces and logs with OpenTelemetry over gRPC.
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from runtimeconditions_observability import (
|
|
62
|
+
OtlpExport,
|
|
63
|
+
SignalsItem,
|
|
64
|
+
Transport,
|
|
65
|
+
rc_observability,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
rc_observability(
|
|
69
|
+
OtlpExport(
|
|
70
|
+
signals=[SignalsItem.TRACES, SignalsItem.LOGS],
|
|
71
|
+
transport=Transport.GRPC,
|
|
72
|
+
),
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
In a Profile, this declares:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
kind: rc.observability
|
|
80
|
+
interface:
|
|
81
|
+
type: otlp_export
|
|
82
|
+
signals: [traces, logs]
|
|
83
|
+
transport: grpc
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Every class, field and enum member is documented in the package's docstrings.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Code generated by runtimeconditions-binding-emitter 0.1.0 from model 4be77a5ea83ff14ba2cb09e6200bf2d599d96cbc91233036edc85a0813d2bddc; DO NOT EDIT.
|
|
2
|
+
[build-system]
|
|
3
|
+
requires = ["setuptools==84.0.0"]
|
|
4
|
+
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "runtimeconditions-observability"
|
|
8
|
+
version = "0.2.0"
|
|
9
|
+
requires-python = ">=3.12"
|
|
10
|
+
description = "Use this extension to say how the platform can see what your workload is doing: its traces, metrics and logs."
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
dependencies = [
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Repository = "https://github.com/runtimeconditions/extensions"
|
|
17
|
+
|
|
18
|
+
[tool.setuptools.packages.find]
|
|
19
|
+
where = ["src"]
|
|
20
|
+
include = ["runtimeconditions_observability", "runtimeconditions_observability.*"]
|
|
21
|
+
|
|
22
|
+
[tool.setuptools.package-data]
|
|
23
|
+
"runtimeconditions_observability" = ["py.typed", "runtimeconditions.bindings.yaml", "runtimeconditions.binding-model.yaml", "runtimeconditions.extension.yaml", "runtimeconditions.binding-release.yaml"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apiVersion: runtimeconditions.io/file-manifest/v1alpha1
|
|
2
|
+
kind: RuntimeConditionsFileManifest
|
|
3
|
+
files:
|
|
4
|
+
MANIFEST.in: d51e89c4c7c5e16c06d543c7aac32df945dd4f536e578b6ad089b68a6f489fca
|
|
5
|
+
README.md: 0e339ee89160d21c17d1fb579bf09e5e7d17f2d0a00eb6ac62d73aa0f2df779c
|
|
6
|
+
pyproject.toml: f8770ad9f56c7f3a912cba680aac839ef83b2225664f9c409847ce8359843b73
|
|
7
|
+
src/runtimeconditions_observability/__init__.py: 4ac577c7d12ab7058a8c737c106816127265d7e4bd5708997ea93a21581c71d7
|
|
8
|
+
src/runtimeconditions_observability/bindings.py: 7ad7ed9b043f92d3fba3f1cd4f18e53b040da4fe4a764150711b2644ad153b65
|
|
9
|
+
src/runtimeconditions_observability/py.typed: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
|
10
|
+
src/runtimeconditions_observability/runtimeconditions.binding-model.yaml: 21312d6d704deea0bef59641334b05bd07515aeeb96dd2bd0d313f3a6e6633a6
|
|
11
|
+
src/runtimeconditions_observability/runtimeconditions.binding-release.yaml: 988fc35ac2e0c1df7db0b450de63272fed6f0c1d232376cbd22683fb1502acc8
|
|
12
|
+
src/runtimeconditions_observability/runtimeconditions.bindings.yaml: dfe09df3acdd765997073c953353a618a407b3b00f7360bee765de33d568b057
|
|
13
|
+
src/runtimeconditions_observability/runtimeconditions.extension.yaml: ca40af3f41193f01d0eec2c60361babb5d2a51b6e11a1530b2ecb0a853e9eed4
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Code generated by runtimeconditions-binding-emitter 0.1.0 from model 4be77a5ea83ff14ba2cb09e6200bf2d599d96cbc91233036edc85a0813d2bddc; DO NOT EDIT.
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .bindings import (
|
|
5
|
+
Declaration,
|
|
6
|
+
OtlpExport,
|
|
7
|
+
PrometheusScrape,
|
|
8
|
+
RcObservabilityField,
|
|
9
|
+
Scheme,
|
|
10
|
+
Signals,
|
|
11
|
+
SignalsItem,
|
|
12
|
+
Transport,
|
|
13
|
+
rc_observability,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"Declaration",
|
|
18
|
+
"OtlpExport",
|
|
19
|
+
"PrometheusScrape",
|
|
20
|
+
"RcObservabilityField",
|
|
21
|
+
"Scheme",
|
|
22
|
+
"Signals",
|
|
23
|
+
"SignalsItem",
|
|
24
|
+
"Transport",
|
|
25
|
+
"rc_observability",
|
|
26
|
+
]
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Code generated by runtimeconditions-binding-emitter 0.1.0 from model 4be77a5ea83ff14ba2cb09e6200bf2d599d96cbc91233036edc85a0813d2bddc; DO NOT EDIT.
|
|
2
|
+
"""Runtime Conditions defined by
|
|
3
|
+
https://runtimeconditions.io/extensions/rc/observability/0.2.0/runtimeconditions.extension.yaml.
|
|
4
|
+
|
|
5
|
+
Use this extension to say how the platform can see what your workload is doing: its
|
|
6
|
+
traces, metrics and logs.
|
|
7
|
+
|
|
8
|
+
There are two ways, and each one is an interface type:
|
|
9
|
+
|
|
10
|
+
- otlp_export: your workload sends its traces, metrics or logs to a receiver, using
|
|
11
|
+
OpenTelemetry (OTLP). The platform gives it a receiver to send to. -
|
|
12
|
+
prometheus_scrape: your workload shows its metrics on a web address, and a
|
|
13
|
+
Prometheus server reads them from time to time. The platform sets up the reading.
|
|
14
|
+
|
|
15
|
+
If your workload does both, add one Condition for each.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
from dataclasses import dataclass
|
|
21
|
+
from enum import StrEnum
|
|
22
|
+
from typing import Protocol, Sequence, TypeAlias
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass(frozen=True, kw_only=True)
|
|
26
|
+
class Declaration:
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class RcObservabilityField(Protocol):
|
|
31
|
+
def rc_marker_c6a9829b134fb5ef(self) -> None: ...
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True, kw_only=True)
|
|
35
|
+
class OtlpExport:
|
|
36
|
+
"""Your workload sends telemetry to an OpenTelemetry (OTLP) receiver.
|
|
37
|
+
|
|
38
|
+
Example: a workload that sends its traces, metrics and logs with OpenTelemetry
|
|
39
|
+
over HTTP.
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
kind: rc.observability
|
|
43
|
+
interface:
|
|
44
|
+
type: otlp_export
|
|
45
|
+
signals: [traces, metrics, logs]
|
|
46
|
+
transport: http/protobuf
|
|
47
|
+
```
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
signals: Signals
|
|
51
|
+
"""The kinds of telemetry that your workload sends, such as traces, metrics and
|
|
52
|
+
logs.
|
|
53
|
+
|
|
54
|
+
At least one of traces, metrics and logs, each one once.
|
|
55
|
+
"""
|
|
56
|
+
transport: Transport
|
|
57
|
+
"""How your workload sends the telemetry. The receiver must accept this way.
|
|
58
|
+
|
|
59
|
+
grpc, http/protobuf or http/json. The receiver must accept it.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
def rc_marker_c6a9829b134fb5ef(self) -> None:
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@dataclass(frozen=True, kw_only=True)
|
|
67
|
+
class PrometheusScrape:
|
|
68
|
+
"""Your workload shows metrics that a Prometheus server can read.
|
|
69
|
+
|
|
70
|
+
Example: a workload that shows its metrics over HTTP, on port 9090, at the path
|
|
71
|
+
/metrics.
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
kind: rc.observability
|
|
75
|
+
interface:
|
|
76
|
+
type: prometheus_scrape
|
|
77
|
+
port: 9090
|
|
78
|
+
path: /metrics
|
|
79
|
+
scheme: http
|
|
80
|
+
```
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
path: str
|
|
84
|
+
"""The web path where your workload shows its metrics, such as /metrics.
|
|
85
|
+
|
|
86
|
+
The web path. It must start with /.
|
|
87
|
+
"""
|
|
88
|
+
port: int
|
|
89
|
+
"""The TCP port where your workload shows its metrics.
|
|
90
|
+
|
|
91
|
+
A TCP port, from 1 to 65535.
|
|
92
|
+
"""
|
|
93
|
+
scheme: Scheme
|
|
94
|
+
"""Whether Prometheus reads the metrics over http or https.
|
|
95
|
+
|
|
96
|
+
http or https.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
def rc_marker_c6a9829b134fb5ef(self) -> None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class Scheme(StrEnum):
|
|
104
|
+
"""Whether Prometheus reads the metrics over http or https.
|
|
105
|
+
|
|
106
|
+
http or https.
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
HTTP = "http"
|
|
110
|
+
"""Read the metrics over plain HTTP."""
|
|
111
|
+
HTTPS = "https"
|
|
112
|
+
"""Read the metrics over HTTPS."""
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
Signals: TypeAlias = "Sequence[SignalsItem]"
|
|
116
|
+
"""The kinds of telemetry that your workload sends, such as traces, metrics and logs.
|
|
117
|
+
|
|
118
|
+
At least one of traces, metrics and logs, each one once.
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class SignalsItem(StrEnum):
|
|
123
|
+
LOGS = "logs"
|
|
124
|
+
"""Logs, which are the lines of text that your workload writes about what it does."""
|
|
125
|
+
METRICS = "metrics"
|
|
126
|
+
"""Metrics, which are numbers measured over time, such as the number of requests."""
|
|
127
|
+
TRACES = "traces"
|
|
128
|
+
"""Traces, which show how one request moves through your services."""
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class Transport(StrEnum):
|
|
132
|
+
"""How your workload sends the telemetry. The receiver must accept this way.
|
|
133
|
+
|
|
134
|
+
grpc, http/protobuf or http/json. The receiver must accept it.
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
GRPC = "grpc"
|
|
138
|
+
"""OTLP over gRPC, with the data in Protocol Buffers."""
|
|
139
|
+
HTTP_JSON = "http/json"
|
|
140
|
+
"""OTLP over HTTP, with the data in JSON."""
|
|
141
|
+
HTTP_PROTOBUF = "http/protobuf"
|
|
142
|
+
"""OTLP over HTTP, with the data in Protocol Buffers."""
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def rc_observability(*fields: RcObservabilityField) -> Declaration:
|
|
146
|
+
"""Declare a rc.observability Condition.
|
|
147
|
+
|
|
148
|
+
Your workload sends telemetry to the platform, or shows telemetry that the
|
|
149
|
+
platform must collect.
|
|
150
|
+
|
|
151
|
+
Example: a workload that sends its traces and logs with OpenTelemetry over gRPC.
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
rc_observability(
|
|
155
|
+
OtlpExport(
|
|
156
|
+
signals=[SignalsItem.TRACES, SignalsItem.LOGS],
|
|
157
|
+
transport=Transport.GRPC,
|
|
158
|
+
),
|
|
159
|
+
)
|
|
160
|
+
```
|
|
161
|
+
"""
|
|
162
|
+
return Declaration()
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
__all__ = [
|
|
166
|
+
"Declaration",
|
|
167
|
+
"OtlpExport",
|
|
168
|
+
"PrometheusScrape",
|
|
169
|
+
"RcObservabilityField",
|
|
170
|
+
"Scheme",
|
|
171
|
+
"Signals",
|
|
172
|
+
"SignalsItem",
|
|
173
|
+
"Transport",
|
|
174
|
+
"rc_observability",
|
|
175
|
+
]
|
|
File without changes
|