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

Wrong error handling in resource.Environment() method #1850

Closed
YuriiBarninets opened this issue Apr 27, 2021 · 0 comments · Fixed by #1851
Closed

Wrong error handling in resource.Environment() method #1850

YuriiBarninets opened this issue Apr 27, 2021 · 0 comments · Fixed by #1851
Assignees
Labels
bug Something isn't working

Comments

@YuriiBarninets
Copy link

YuriiBarninets commented Apr 27, 2021

Description

There is a misprint within resource.Environment() method that leads to the following log entry:

2021/04/27 17:32:32 < nil >

The condition has to be if err != nil

Steps To Reproduce

  1. Create SDK Tracer Provider with TracerProviderOption that will configure Resource, e.g.

opts []trace.TracerProviderOption
opts = append(opts , trace.WithResource(resource.NewWithAttributes(semconv.ServiceNameKey.String("Test service"))))
tp := sdktrace.NewTracerProvider(opts ...)

Expected behavior

There should not be 2021/04/27 17:32:32 < nil > log entry.

@YuriiBarninets YuriiBarninets added the bug Something isn't working label Apr 27, 2021
@MrAlias MrAlias self-assigned this Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants