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

Closed
1 task done
seemk opened this issue Nov 5, 2024 · 2 comments
Closed
1 task done

Resource should not log an error for attribute access #5114

seemk opened this issue Nov 5, 2024 · 2 comments
Labels

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
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Jan 13, 2025
Copy link

This issue was closed because it has been stale for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant