You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/registry/attributes/service.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ A service instance.
12
12
| <aid="service-instance-id"href="#service-instance-id">`service.instance.id`</a> | string | The string ID of the service instance. [1]|`627cc493-f310-47de-96bd-71410b7dec09`||
13
13
| <aid="service-name"href="#service-name">`service.name`</a> | string | Logical name of the service. [2]|`shoppingcart`||
14
14
| <aid="service-namespace"href="#service-namespace">`service.namespace`</a> | string | A namespace for `service.name`. [3]|`Shop`||
15
+
| <aid="service-roles"href="#service-roles">`service.roles`</a> | string[]| Roles of a service node. [4]|`["ui", "background_tasks"]`; `["background_tasks"]`||
16
+
| <aid="service-state"href="#service-state">`service.state`</a> | string | Current state of the service. [5]|`starting`; `running`; `stopping`; `stopped`||
15
17
| <aid="service-version"href="#service-version">`service.version`</a> | string | The version string of the service API or implementation. The format is not defined by these conventions. |`2.0.0`; `a01dbef8a`||
16
18
17
19
**[1]`service.instance.id`:** MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words
@@ -44,3 +46,13 @@ port.
44
46
**[2]`service.name`:** MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
45
47
46
48
**[3]`service.namespace`:** A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
49
+
50
+
**[4]`service.roles`:** This allows for distinction between different running roles of the same service.
51
+
52
+
In the case of Kibana, the service.node.role could be ui or background_tasks or both.
53
+
54
+
In the case of Elasticsearch, the service.node.role could be master or data or both.
55
+
56
+
Other services could use this to distinguish between a web and worker role running as part of the service.
57
+
58
+
**[5]`service.state`:** This state could be reported a collector which monitors the services
|[`service.name`](/docs/registry/attributes/service.md)| string | Logical name of the service. [1]|`shoppingcart`|`Required`||
21
-
|[`service.instance.id`](/docs/registry/attributes/service.md)| string |The string ID of the service instance.[2]|`627cc493-f310-47de-96bd-71410b7dec09`|`Recommended`||
22
-
|[`service.namespace`](/docs/registry/attributes/service.md)| string |A namespace for `service.name`. [3]|`Shop`|`Recommended`||
21
+
|[`service.namespace`](/docs/registry/attributes/service.md)| string |A namespace for `service.name`.[2]|`Shop`|`Recommended`||
22
+
|[`service.version`](/docs/registry/attributes/service.md)| string |The version string of the service API or implementation. The format is not defined by these conventions. |`2.0.0`; `a01dbef8a`|`Recommended`||
23
23
24
24
**[1]`service.name`:** MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
25
25
26
-
**[2]`service.instance.id`:** MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words
26
+
**[2]`service.namespace`:** A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
|[`service.roles`](/docs/registry/attributes/service.md)| string[]| Roles of a service node. [3]|`["ui", "background_tasks"]`; `["background_tasks"]`|`Recommended`||
33
+
|[`service.state`](/docs/registry/attributes/service.md)| string | Current state of the service. [4]|`starting`; `running`; `stopping`; `stopped`|`Recommended`||
34
+
35
+
**[3]`service.roles`:** This allows for distinction between different running roles of the same service.
36
+
37
+
In the case of Kibana, the service.node.role could be ui or background_tasks or both.
38
+
39
+
In the case of Elasticsearch, the service.node.role could be master or data or both.
40
+
41
+
Other services could use this to distinguish between a web and worker role running as part of the service.
42
+
43
+
**[4]`service.state`:** This state could be reported a collector which monitors the services
|[`service.instance.id`](/docs/registry/attributes/service.md)| string | The string ID of the service instance. [5]|`627cc493-f310-47de-96bd-71410b7dec09`|`Recommended`||
58
+
59
+
**[5]`service.instance.id`:** MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words
27
60
`service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to
28
61
distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled
29
62
service).
@@ -50,13 +83,17 @@ However, Collectors can set the `service.instance.id` if they can unambiguously
50
83
for that telemetry. This is typically the case for scraping receivers, as they know the target address and
51
84
port.
52
85
53
-
**[3]`service.namespace`:** A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
|[`service.name`](/docs/registry/attributes/service.md)| string | Logical name of the service. [6]|`shoppingcart`|`Required`||
91
+
|[`service.namespace`](/docs/registry/attributes/service.md)| string | A namespace for `service.name`. [7]|`Shop`|`Recommended`||
59
92
|[`service.version`](/docs/registry/attributes/service.md)| string | The version string of the service API or implementation. The format is not defined by these conventions. |`2.0.0`; `a01dbef8a`|`Recommended`||
60
93
94
+
**[6]`service.name`:** MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
95
+
96
+
**[7]`service.namespace`:** A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
|[`service.name`](/docs/registry/attributes/service.md)| string | Logical name of the service. [1]|`shoppingcart`|`Required`||
87
-
|[`service.instance.id`](/docs/registry/attributes/service.md)| string | The string ID of the service instance. [2]|`627cc493-f310-47de-96bd-71410b7dec09`|`Recommended`||
88
-
|[`service.namespace`](/docs/registry/attributes/service.md)| string | A namespace for `service.name`. [3]|`Shop`|`Recommended`||
87
+
|[`service.namespace`](/docs/registry/attributes/service.md)| string | A namespace for `service.name`. [2]|`Shop`|`Recommended`||
88
+
|[`service.roles`](/docs/registry/attributes/service.md)| string[]| Roles of a service node. [3]|`["ui", "background_tasks"]`; `["background_tasks"]`|`Recommended`||
89
+
|[`service.state`](/docs/registry/attributes/service.md)| string | Current state of the service. [4]|`starting`; `running`; `stopping`; `stopped`|`Recommended`||
89
90
|[`service.version`](/docs/registry/attributes/service.md)| string | The version string of the service API or implementation. The format is not defined by these conventions. |`2.0.0`; `a01dbef8a`|`Recommended`||
90
91
91
92
**[1]`service.name`:** MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
92
93
93
-
**[2]`service.instance.id`:** MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words
94
-
`service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to
95
-
distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled
96
-
service).
97
-
98
-
Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC
99
-
4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of
100
-
this value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version 5 and
101
-
SHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
102
-
103
-
UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is
104
-
needed. Similar to what can be seen in the man page for the
105
-
[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying
106
-
data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it
107
-
or not via another resource attribute.
108
-
109
-
For applications running behind an application server (like unicorn), we do not recommend using one identifier
110
-
for all processes participating in the application. Instead, it's recommended each division (e.g. a worker
111
-
thread in unicorn) to have its own instance.id.
112
-
113
-
It's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the
114
-
service instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will
115
-
likely be wrong, as the Collector might not know from which container within that pod the telemetry originated.
116
-
However, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance
117
-
for that telemetry. This is typically the case for scraping receivers, as they know the target address and
118
-
port.
119
-
120
-
**[3]`service.namespace`:** A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
94
+
**[2]`service.namespace`:** A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
95
+
96
+
**[3]`service.roles`:** This allows for distinction between different running roles of the same service.
97
+
98
+
In the case of Kibana, the service.node.role could be ui or background_tasks or both.
99
+
100
+
In the case of Elasticsearch, the service.node.role could be master or data or both.
101
+
102
+
Other services could use this to distinguish between a web and worker role running as part of the service.
103
+
104
+
**[4]`service.state`:** This state could be reported a collector which monitors the services
0 commit comments