Skip to content

[processor/resourcedetection] fix when panic when AKS detector is used #24549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

dloucasfx
Copy link
Contributor

Description:
Address the following panic when AKS detector is used.
This issue was introduced by this change 04327f5

panic: interface conversion: internal.DetectorConfig is nil, not aks.Config

goroutine 1 [running]:
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks.NewDetector({{{0xc0023d5638, 0x11}, {0x0, 0x0}}, {0xc002568fc0, {0x6877700, 0xc0024f1580},            {0x68a1850, 0xc00251b590}, 0x0, ...}, ...}, ...)
        github.com/open-telemetry/opentelemetry-collector-contrib/processor/[email protected]/internal/azure/aks/aks.go:34 +0x10a
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal.(*ResourceProviderFactory).getDetectors(0xc00082ffe0, {{{0xc0023d5638, 0x11}, {0x0, 0x0}}, {0xc002568fc0,       {0x6877700, 0xc0024f1580}, {0x68a1850, 0xc00251b590}, ...}, ...}, ...)
        github.com/open-telemetry/opentelemetry-collector-contrib/processor/[email protected]/internal/resourcedetection.go:73 +0x182
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal.(*ResourceProviderFactory).CreateResourceProvider(0xc001dbfeb8?, {{{0xc0023d5638, 0x11}, {0x0, 0x0}},           {0xc002568fc0, {0x6877700, 0xc0024f1580}, {0x68a1850, 0xc00251b590}, ...}, ...}, ...)
        github.com/open-telemetry/opentelemetry-collector-contrib/processor/[email protected]/internal/resourcedetection.go:49 +0x9d

Link to tracking Issue:

Testing:
Manual validation
Documentation:

@dloucasfx dloucasfx requested a review from a team July 25, 2023 19:23
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Jul 25, 2023
@dloucasfx dloucasfx force-pushed the resourcedetectionAKS branch from 4a0cd24 to 26fc8de Compare July 25, 2023 19:26
Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @dloucasfx!

@dmitryax dmitryax merged commit a877923 into open-telemetry:main Jul 25, 2023
@github-actions github-actions bot added this to the next release milestone Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants