You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	WithContainerID: Document ECS limitation. (#3639)
* WithContainerID: Document ECS limitation. WithContainerID is not able to extract the correct container id in an ECS environment. The ECS resource detector should be used instead (https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ecs). See #3633. * fix lint * Update sdk/resource/config.go --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
		| @@ -194,6 +194,8 @@ func WithContainer() Option { | ||||
| } | ||||
|  | ||||
| // WithContainerID adds an attribute with the id of the container to the configured Resource. | ||||
| // Note: WithContainerID will not extract the correct container ID in an ECS environment. | ||||
| // Please use the ECS resource detector instead (https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ecs). | ||||
| func WithContainerID() Option { | ||||
| 	return WithDetectors(cgroupContainerIDDetector{}) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user