Skip to content

Commit c941e30

Browse files
committed
PR review feedback
1 parent 2649534 commit c941e30

1 file changed

Lines changed: 1 addition & 32 deletions

File tree

specification/entities/entity-propagation.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ linkTitle: Entity Propagation
2020
* [Character Encoding](#character-encoding)
2121
* [Validation Requirements](#validation-requirements)
2222
* [Error Handling](#error-handling)
23-
* [Environment Variable Conflict Resolution](#environment-variable-conflict-resolution)
2423
- [EnvEntityDetector](#Enventitydetector)
2524

2625
<!-- tocstop -->
@@ -180,44 +179,14 @@ The SDK SHOULD be resilient to malformed input and follow these error handling r
180179

181180
Example: `OTEL_ENTITIES="service{service.name=app1}@invalid-url"` processes the entity but ignores the invalid URL
182181

183-
5. **Conflicting identifying attributes**: If two entities of the same type define different values for the same identifying attribute key, the SDK SHOULD treat them as separate entities. If this results in ambiguous entity identification, the SDK SHOULD log a warning and preserve only the last entity
182+
5. **Conflicting identifying attributes**: If two entities of the same type define different values for the same identifying attribute key, the SDK SHOULD log a warning and preserve only the last entity
184183

185184
Example: `OTEL_ENTITIES="service{service.name=app1};service{service.name=app2}"` creates only service.name=app2 entity
186185

187186
6. **Conflicting descriptive attributes**: If two entities define different values for the same descriptive attribute key, the SDK SHOULD use the value from the last entity definition and SHOULD log a warning. The conflicting attributes SHOULD NOT be recorded for entities other than the last one
188187

189188
Example: `OTEL_ENTITIES="service{service.name=app1}[version=1.0];service{service.name=app2}[version=2.0]"` results in app1 service without version attribute and app2 service with `version=2.0`
190189

191-
### Environment Variable Conflict Resolution
192-
193-
When multiple environment variables define overlapping configuration, a warning should be logged and the following precedence order applied (highest to lowest precedence):
194-
195-
1. **Programmatic configuration**: Entities configured via SDK API take highest precedence and override all environment variable configurations
196-
2. **OTEL_ENTITIES**: Entity definitions from this environment variable override resource attributes and other OTEL_* environment variables for the same attribute keys
197-
3. **OTEL_SERVICE_NAME**: Takes precedence over `service.name` in `OTEL_RESOURCE_ATTRIBUTES` but is overridden by `service.name` in `OTEL_ENTITIES`
198-
4. **Other specific OTEL_* variables**: Individual environment variables (when they exist) take precedence over equivalent attributes in `OTEL_RESOURCE_ATTRIBUTES`
199-
5. **OTEL_RESOURCE_ATTRIBUTES**: Lowest precedence for overlapping attribute keys
200-
201-
**Precedence rules within OTEL_ENTITIES:**
202-
203-
- When the same entity type appears multiple times with identical identifying attributes, the last occurrence takes precedence
204-
205-
**Example of conflict resolution:**
206-
207-
```bash
208-
# These environment variables:
209-
OTEL_SERVICE_NAME="old-service-name"
210-
OTEL_RESOURCE_ATTRIBUTES="service.name=resource-service,host.name=resource-host,custom.attr=resource-value"
211-
OTEL_ENTITIES="service{service.name=entity-service,service.instance.id=inst-1}[service.version=1.0.0];host{host.id=host-123}[host.name=entity-host]"
212-
213-
# Result in:
214-
# - Service entity with identifying attributes: {service.name=entity-service, service.instance.id=inst-1} (from OTEL_ENTITIES, overrides others)
215-
# and descriptive attributes: {service.version=1.0.0}
216-
# - Host entity with identifying attributes: {host.id=host-123}
217-
# and descriptive attributes: {host.name=entity-host} (from OTEL_ENTITIES, overrides OTEL_RESOURCE_ATTRIBUTES)
218-
# - Resource: remaining attributes from OTEL_RESOURCE_ATTRIBUTES that don't conflict: {custom.attr=resource-value}
219-
```
220-
221190
## EnvEntityDetector
222191

223192
TODO: fill out

0 commit comments

Comments
 (0)