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

Resource should not log an error for attribute access #5114

Open
1 task done
seemk opened this issue Nov 5, 2024 · 0 comments
Open
1 task done

Resource should not log an error for attribute access #5114

seemk opened this issue Nov 5, 2024 · 0 comments

Comments

@seemk
Copy link
Contributor

seemk commented Nov 5, 2024

const asyncDetect = Promise.resolve({ 'host': 'abc' });
const resource = new Resource({ 'service.name': 'foo' }, asyncDetect());
console.log(resource.attributes['service.name']);
// Logs 'Accessing resource attributes before async attributes settled'

Why is this case an error? If the sync and async attributes are unrelated, it should still be possible to access the resolved/sync attributes without logging an error.

I propose to either remove the diagnostic completely (as the Resource has an API to check whether the attributes are pending) or demote it do debug.

  • This only affects the JavaScript OpenTelemetry library
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

No branches or pull requests

1 participant