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

Add setAttributes to make it easier to add them in bulk. #37

Closed
rochdev opened this issue Jun 17, 2019 · 0 comments · Fixed by #44
Closed

Add setAttributes to make it easier to add them in bulk. #37

rochdev opened this issue Jun 17, 2019 · 0 comments · Fixed by #44

Comments

@rochdev
Copy link
Member

rochdev commented Jun 17, 2019

Is your feature request related to a problem? Please describe.

In JavaScript, it's much easier to use a map-style object to add multiple attributes at once. Having to call setAttribute multiple times is thus unnecessary and requires more code, especially if copying from an existing object.

Describe the solution you'd like

It should be possible to add multiple attributes using a single call.

For example:

span.setAttributes({
  'http.method': 'GET',
  'http.path': '/foo/bar'
})

span.setAttributes(existingObject)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants