You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-29 23:07:45 +02:00
Add container id support to Resource (#2418)
* Add container id support to Resource * Fix wrong test case name * Add WithContainer option * Update CHANGELOG * Fix comments * Update CHANGELOG * Use regex to find container id * Add tests for reading cgroup file * Update sdk/resource/container.go Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> * Update format Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
@@ -102,13 +102,14 @@ func restoreAttributesProviders() {
|
||||
resource.SetDefaultRuntimeProviders()
|
||||
resource.SetDefaultUserProviders()
|
||||
resource.SetDefaultOSDescriptionProvider()
|
||||
resource.SetDefaultContainerProviders()
|
||||
}
|
||||
|
||||
func TestWithProcessFuncsErrors(t *testing.T) {
|
||||
mockProcessAttributesProvidersWithErrors()
|
||||
|
||||
t.Run("WithPID", testWithProcessExecutablePathError)
|
||||
t.Run("WithExecutableName", testWithProcessOwnerError)
|
||||
t.Run("WithExecutablePath", testWithProcessExecutablePathError)
|
||||
t.Run("WithOwner", testWithProcessOwnerError)
|
||||
|
||||
restoreAttributesProviders()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user