Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -839,18 +839,14 @@ resource:
# Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language.
# If omitted or null, no resource detectors are enabled.
detectors:
- # Enable the container resource detector.
# Note, the key "container" is an example and detector names may vary by SDK language ecosystem.
- # Enable the container resource detector, which populates container.* attributes.
container:
- # Enable the host resource detector.
# Note, the key "host" is an example and detector names may vary by SDK language ecosystem.
- # Enable the host resource detector, which populates host.* and os.* attributes.
host:
- # Enable the os resource detector.
# Note, the key "os" is an example and detector names may vary by SDK language ecosystem.
os:
- # Enable the process resource detector.
# Note, the key "process" is an example and detector names may vary by SDK language ecosystem.
- # Enable the process resource detector, which populates process.* attributes.
process:
- # Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME environment variable and service.instance.id.
service:
# Configure resource schema URL.
# If omitted or null, no schema URL is used.
schema_url: https://opentelemetry.io/schemas/1.16.0
Expand Down
28 changes: 28 additions & 0 deletions schema/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,38 @@
"minProperties": 1,
"maxProperties": 1,
"patternProperties": {
"container": {
"$ref": "#/$defs/ExperimentalContainerResourceDetector"
},
"host": {
"$ref": "#/$defs/ExperimentalHostResourceDetector"
},
"process": {
"$ref": "#/$defs/ExperimentalProcessResourceDetector"
},
"service": {
"$ref": "#/$defs/ExperimentalServiceResourceDetector"
},
".*": {
"type": ["object", "null"]
}
}
},
"ExperimentalContainerResourceDetector": {
"type": ["object", "null"],
"additionalProperties": false
},
"ExperimentalHostResourceDetector": {
"type": ["object", "null"],
"additionalProperties": false
},
"ExperimentalProcessResourceDetector": {
"type": ["object", "null"],
"additionalProperties": false
},
"ExperimentalServiceResourceDetector": {
"type": ["object", "null"],
"additionalProperties": false
}
}
}
18 changes: 5 additions & 13 deletions schema/type_descriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,13 @@
- type: Detector
property_descriptions:
container: >
Enable the container resource detector.

Note, the key "container" is an example and detector names may vary by SDK language ecosystem.
Enable the container resource detector, which populates container.* attributes.
host: >
Enable the host resource detector.

Note, the key "host" is an example and detector names may vary by SDK language ecosystem.
os: >
Enable the os resource detector.

Note, the key "os" is an example and detector names may vary by SDK language ecosystem.
Enable the host resource detector, which populates host.* and os.* attributes.
process: >
Enable the process resource detector.
Note, the key "process" is an example and detector names may vary by SDK language ecosystem.
Enable the process resource detector, which populates process.* attributes.
service: >
Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME environment variable and service.instance.id.
path_patterns:
- .resource.detection/development.detectors[]

Expand Down
Loading