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
[chore] Reference documentation.md for resource attributes per resource detector (open-telemetry#35737)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR fixes the issue described at
open-telemetry#34210.
Each detector's docs should list the resource attributes as they are
defined by the `metadata.yml` files.
This PR links each detector to its `documentation.md` as a reference for
the respective Resource Atrributes.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixesopen-telemetry#34210
<!--Describe what testing was performed and which tests were added.-->
#### Testing ~
<!--Describe the documentation added.-->
#### Documentation
Added
<!--Please delete paragraphs that you did not use before submitting.-->
Signed-off-by: ChrsMark <[email protected]>
Note: use the Docker detector (see below) if running the Collector as a Docker container.
41
41
42
-
Queries the host machine to retrieve the following resource attributes:
43
-
44
-
* host.arch
45
-
* host.name
46
-
* host.id
47
-
* host.ip
48
-
* host.mac
49
-
* host.cpu.vendor.id
50
-
* host.cpu.family
51
-
* host.cpu.model.id
52
-
* host.cpu.model.name
53
-
* host.cpu.stepping
54
-
* host.cpu.cache.l2.size
55
-
* os.description
56
-
* os.type
42
+
Queries the host machine to retrieve the system related resource attributes. The list of the
43
+
populated resource attributes can be found at [System Detector Resource Attributes](./internal/system/documentation.md).
57
44
58
45
By default `host.name` is being set to FQDN if possible, and a hostname provided by OS used as fallback.
59
46
This logic can be changed with `hostname_sources` configuration which is set to `["dns", "os"]` by default.
@@ -98,10 +85,9 @@ The "lookup" hostname source does a reverse DNS lookup of the current host's IP
98
85
99
86
### Docker metadata
100
87
101
-
Queries the Docker daemon to retrieve the following resource attributes from the host machine:
102
-
103
-
* host.name
104
-
* os.type
88
+
Queries the Docker daemon to retrieve resource attributes from the host machine.
89
+
The list of the populated resource attributes can
90
+
be found at [Docker Detector Resource Attributes](./internal/docker/documentation.md).
105
91
106
92
You need to mount the Docker socket (`/var/run/docker.sock` on Linux) to contact the Docker daemon.
107
93
Docker detection does not work on macOS.
@@ -133,6 +119,8 @@ We map these environment variables to resource attributes as follows:
133
119
134
120
For more information, see the [Heroku cloud provider documentation](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/cloud-provider/heroku.md) under the [OpenTelemetry specification semantic conventions](https://github.com/open-telemetry/semantic-conventions).
135
121
122
+
The list of the populated resource attributes can be found at [Heroku Detector Resource Attributes](./internal/heroku/documentation.md).
123
+
136
124
```yaml
137
125
processors:
138
126
resourcedetection/heroku:
@@ -158,6 +146,8 @@ processors:
158
146
override: false
159
147
```
160
148
149
+
The list of the populated resource attributes can be found at [GCP Detector Resource Attributes](./internal/gcp/documentation.md).
150
+
161
151
#### GCE Metadata
162
152
163
153
* cloud.provider ("gcp")
@@ -231,17 +221,10 @@ able to determine `host.name`. In that case, users are encouraged to set `host.n
231
221
232
222
### AWS EC2
233
223
234
-
Uses [AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/api/aws/ec2metadata/) to read resource information from the [EC2 instance metadata API](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) to retrieve the following resource attributes:
224
+
Uses [AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/api/aws/ec2metadata/) to read resource information
225
+
from the [EC2 instance metadata API](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) to retrieve related resource attributes:
235
226
236
-
* cloud.provider ("aws")
237
-
* cloud.platform ("aws_ec2")
238
-
* cloud.account.id
239
-
* cloud.region
240
-
* cloud.availability_zone
241
-
* host.id
242
-
* host.image.id
243
-
* host.name
244
-
* host.type
227
+
The list of the populated resource attributes can be found at [EC2 Detector Resource Attributes](./internal/aws/ec2/documentation.md).
245
228
246
229
It also can optionally gather tags for the EC2 instance that the collector is running on.
247
230
Note that in order to fetch EC2 tags, the IAM role assigned to the EC2 instance must have a policy that includes the `ec2:DescribeTags` permission.
@@ -267,21 +250,7 @@ If the instance is part of AWS ParallelCluster and the detector is failing to co
267
250
268
251
Queries the [Task Metadata Endpoint](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint.html) (TMDE) to record information about the current ECS Task. Only TMDE V4 and V3 are supported.
269
252
270
-
* cloud.provider ("aws")
271
-
* cloud.platform ("aws_ecs")
272
-
* cloud.account.id
273
-
* cloud.region
274
-
* cloud.availability_zone
275
-
* aws.ecs.cluster.arn
276
-
* aws.ecs.task.arn
277
-
* aws.ecs.task.family
278
-
* aws.ecs.task.id
279
-
* aws.ecs.task.revision
280
-
* aws.ecs.launchtype (V4 only)
281
-
* aws.log.group.names (V4 only)
282
-
* aws.log.group.arns (V4 only)
283
-
* aws.log.stream.names (V4 only)
284
-
* aws.log.stream.arns (V4 only)
253
+
The list of the populated resource attributes can be found at [ECS Detector Resource Attributes](./internal/aws/ecs/documentation.md).
285
254
286
255
Example:
287
256
@@ -297,11 +266,7 @@ processors:
297
266
298
267
Reads the AWS X-Ray configuration file available on all Beanstalk instances with [X-Ray Enabled](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-configuration-debugging.html).
299
268
300
-
* cloud.provider ("aws")
301
-
* cloud.platform ("aws_elastic_beanstalk")
302
-
* deployment.environment
303
-
* service.instance.id
304
-
* service.version
269
+
The list of the populated resource attributes can be found at [Elastic Beanstalk Detector Resource Attributes](./internal/aws/elasticbeanstalk/documentation.md).
305
270
306
271
Example:
307
272
@@ -315,9 +280,7 @@ processors:
315
280
316
281
### Amazon EKS
317
282
318
-
* cloud.provider ("aws")
319
-
* cloud.platform ("aws_eks")
320
-
* k8s.cluster.name
283
+
The list of the populated resource attributes can be found at [EKS Detector Resource Attributes](./internal/aws/eks/documentation.md).
321
284
322
285
Example:
323
286
@@ -352,26 +315,9 @@ If you see an error with the message `context deadline exceeded`, please increas
352
315
### AWS Lambda
353
316
354
317
Uses the AWS Lambda [runtime environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime)
The list of the populated resource attributes can be found at [Lambda Detector Resource Attributes](./internal/aws/lambda/documentation.md).
375
321
376
322
Example:
377
323
@@ -385,18 +331,9 @@ processors:
385
331
386
332
### Azure
387
333
388
-
Queries the [Azure Instance Metadata Service](https://aka.ms/azureimds) to retrieve the following resource attributes:
334
+
Queries the [Azure Instance Metadata Service](https://aka.ms/azureimds) to retrieve related attributes.
389
335
390
-
* cloud.provider ("azure")
391
-
* cloud.platform ("azure_vm")
392
-
* cloud.region
393
-
* cloud.account.id (subscription ID)
394
-
* host.id (virtual machine ID)
395
-
* host.name
396
-
* azure.vm.name (same as host.name)
397
-
* azure.vm.size (virtual machine size)
398
-
* azure.vm.scaleset.name (name of the scale set if any)
399
-
* azure.resourcegroup.name (resource group name)
336
+
The list of the populated resource attributes can be found at [Azure Detector Resource Attributes](./internal/azure/documentation.md).
400
337
401
338
Example:
402
339
@@ -430,9 +367,7 @@ Matched tags are added as:
430
367
431
368
### Azure AKS
432
369
433
-
* cloud.provider ("azure")
434
-
* cloud.platform ("azure_aks")
435
-
* k8s.cluster.name
370
+
The list of the populated resource attributes can be found at [AKS Detector Resource Attributes](./internal/azure/aks/documentation.md).
436
371
437
372
```yaml
438
373
processors:
@@ -473,11 +408,12 @@ If accurate parsing cannot be performed, the infrastructure resource group value
473
408
474
409
### Consul
475
410
476
-
Queries a [consul agent](https://www.consul.io/docs/agent) and reads its' [configuration endpoint](https://www.consul.io/api-docs/agent#read-configuration) to retrieve the following resource attributes:
411
+
Queries a [consul agent](https://www.consul.io/docs/agent) and reads its' [configuration endpoint](https://www.consul.io/api-docs/agent#read-configuration) to retrieve related resource attributes:
412
+
413
+
The list of the populated resource attributes can be found at [Consul Detector Resource Attributes](./internal/consul/documentation.md).
414
+
415
+
In addition to:
477
416
478
-
* cloud.region (consul datacenter)
479
-
* host.id (consul node id)
480
-
* host.name (consul node name)
481
417
* *exploded consul metadata* - reads all key:value pairs in [consul metadata](https://www.consul.io/docs/agent/options#_node_meta) into label:labelvalue pairs.
482
418
483
419
```yaml
@@ -488,32 +424,11 @@ processors:
488
424
override: false
489
425
```
490
426
491
-
### Heroku
492
-
493
-
** You must first enable the [Heroku metadata feature](https://devcenter.heroku.com/articles/dyno-metadata) on the application **
494
-
495
-
Queries [Heroku metadata](https://devcenter.heroku.com/articles/dyno-metadata) to retrieve the following resource attributes:
496
-
497
-
* heroku.release.version (identifier for the current release)
498
-
* heroku.release.creation_timestamp (time and date the release was created)
499
-
* heroku.release.commit (commit hash for the current release)
500
-
* heroku.app.name (application name)
501
-
* heroku.app.id (unique identifier for the application)
502
-
* heroku.dyno.id (dyno identifier. Used as host name)
503
-
504
-
```yaml
505
-
processors:
506
-
resourcedetection/heroku:
507
-
detectors: [env, heroku]
508
-
timeout: 2s
509
-
override: false
510
-
```
511
-
512
427
### K8S Node Metadata
513
428
514
-
Queries the K8S api server to retrieve the following node resource attributes:
429
+
Queries the K8S api server to retrieve node resource attributes.
515
430
516
-
* k8s.node.uid
431
+
The list of the populated resource attributes can be found at [k8snode Detector Resource Attributes](./internal/k8snode/documentation.md).
517
432
518
433
The following permissions are required:
519
434
```yaml
@@ -566,12 +481,9 @@ and add this to your workload:
566
481
567
482
### Openshift
568
483
569
-
Queries the OpenShift and Kubernetes API to retrieve the following resource attributes:
484
+
Queries the OpenShift and Kubernetes API to retrieve related resource attributes.
570
485
571
-
* cloud.provider
572
-
* cloud.platform
573
-
* cloud.region
574
-
* k8s.cluster.name
486
+
The list of the populated resource attributes can be found at [Openshift Detector Resource Attributes](./internal/openshift/documentation.md).
0 commit comments