Skip to content

Commit 673528d

Browse files
committed
Add more service info #2391
Signed-off-by: James Thompson <[email protected]>
1 parent 4e7c077 commit 673528d

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.chloggen/extend_services.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: service
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Allow services to report their status and what roles they perform
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [2391]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/registry/attributes/service.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ A service instance.
1212
| <a id="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` | ![Development](https://img.shields.io/badge/-development-blue) |
1313
| <a id="service-name" href="#service-name">`service.name`</a> | string | Logical name of the service. [2] | `shoppingcart` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1414
| <a id="service-namespace" href="#service-namespace">`service.namespace`</a> | string | A namespace for `service.name`. [3] | `Shop` | ![Development](https://img.shields.io/badge/-development-blue) |
15+
| <a id="service-roles" href="#service-roles">`service.roles`</a> | string[] | Roles of a service node. [4] | `["ui", "background_tasks"]`; `["background_tasks"]` | ![Development](https://img.shields.io/badge/-development-blue) |
16+
| <a id="service-state" href="#service-state">`service.state`</a> | string | Current state of the service. [5] | `starting`; `running`; `stopping`; `stopped` | ![Development](https://img.shields.io/badge/-development-blue) |
1517
| <a id="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` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1618

1719
**[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.
4446
**[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`.
4547

4648
**[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 an agent which monitors the services

model/service/registry.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,27 @@ groups:
6969
for that telemetry. This is typically the case for scraping receivers, as they know the target address and
7070
port.
7171
examples: ["627cc493-f310-47de-96bd-71410b7dec09"]
72+
- id: service.roles
73+
type: string[]
74+
stability: development
75+
brief: >
76+
Roles of a service node.
77+
note: |
78+
This allows for distinction between different running roles of the same service.
79+
80+
In the case of Kibana, the service.node.role could be ui or background_tasks or both.
81+
82+
In the case of Elasticsearch, the service.node.role could be master or data or both.
83+
84+
Other services could use this to distinguish between a web and worker role running as part of the service.
85+
examples:
86+
- ["ui", "background_tasks"]
87+
- ["background_tasks"]
88+
- id: service.state
89+
type: string
90+
brief: >
91+
Current state of the service.
92+
note: >
93+
This state could be reported a collector which monitors the services
94+
examples: ["starting", "running", "stopping", "stopped"]
95+
stability: development

0 commit comments

Comments
 (0)