Skip to content
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

Fix ECS resource detector bug #569

Merged
merged 14 commits into from
Feb 10, 2021
Merged

Fix ECS resource detector bug #569

merged 14 commits into from
Feb 10, 2021

Conversation

bhautikpip
Copy link
Contributor

@bhautikpip bhautikpip commented Feb 7, 2021

  1. Fixes nil pointer bad reference panic when initialize resource detector as below.
ecsResourceDetector := new(ecs.ResourceDetector)

probably now with the fix we can initialize resource detector as below:

ecsResourceDetector := ecs.NewResourceDetector()
  1. Minor changes
    Reference Issue: ECS resource detector crash aws-observability/aws-otel-go#16

@codecov
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #569 (c9c1bca) into main (b87d221) will decrease coverage by 0.0%.
The diff coverage is 0.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #569     +/-   ##
=======================================
- Coverage   77.9%   77.9%   -0.1%     
=======================================
  Files         55      55             
  Lines       2593    2594      +1     
=======================================
  Hits        2022    2022             
- Misses       441     442      +1     
  Partials     130     130             
Impacted Files Coverage Δ
detectors/aws/ecs/ecs.go 53.8% <0.0%> (-2.2%) ⬇️

@bonclay7
Copy link

bonclay7 commented Feb 8, 2021

Following the issue I've opened here, I went ahead and did a test with this implementation and it working very great for me on ECS with the following modifications

replace go.opentelemetry.io/contrib/detectors/aws/ecs => github.com/bhautikpip/opentelemetry-go-contrib/detectors/aws/ecs v0.16.1-0.20210207012249-86c04d1b71f1
ecsResourceDetector := ecs.ResourceDetector{Utils: new(ecs.DetectorUtils)}
ecsResource, err := ecsResourceDetector.Detect(ctx)

image

detectors/aws/ecs/ecs.go Outdated Show resolved Hide resolved
detectors/aws/ecs/ecs.go Show resolved Hide resolved
@bhautikpip bhautikpip requested a review from XSAM February 9, 2021 23:44
detectors/aws/ecs/ecs.go Outdated Show resolved Hide resolved
detectors/aws/ecs/ecs.go Outdated Show resolved Hide resolved
detectors/aws/ecs/ecs.go Outdated Show resolved Hide resolved
detectors/aws/ecs/ecs.go Outdated Show resolved Hide resolved
@bhautikpip
Copy link
Contributor Author

@MrAlias addressed your comments!

Copy link
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

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

LGTM

@bhautikpip bhautikpip requested a review from MrAlias February 10, 2021 01:45
@MrAlias MrAlias merged commit e532370 into open-telemetry:main Feb 10, 2021
alolita pushed a commit to aws-otel/aws-otel.github.io that referenced this pull request Feb 11, 2021
* Update go-sdk.mdx

1. Updated creation of OTEL exporter as per upstream `0.16.0`
2. Updated ECS and EKS resource detector initialization due to recent bug fix - open-telemetry/opentelemetry-go-contrib#569
open-telemetry/opentelemetry-go-contrib#575

However, we should wait for upstream to release `0.17.0` which will have these changes released.

* Added `otelgrpc` dependency
@MrAlias MrAlias mentioned this pull request Feb 15, 2021
plantfansam referenced this pull request in plantfansam/opentelemetry-go-contrib Mar 18, 2022
This PR changes the circleci build config to build the project in both go-1.13 and go-1.14 versions.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants