-
Notifications
You must be signed in to change notification settings - Fork 213
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 opentracing integration #860
Add opentracing integration #860
Conversation
…e span when validating tracer at client instantiation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍
Changes look good. 👍 |
@@ -13,7 +13,8 @@ function baseData(item, options, callback) { | |||
language: 'javascript', | |||
framework: item.framework || options.framework, | |||
uuid: item.uuid, | |||
notifier: JSON.parse(JSON.stringify(options.notifier)) | |||
notifier: JSON.parse(JSON.stringify(options.notifier)), | |||
custom: item.custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in duplicated properties in Occurrences view... Could we revert this part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intent is to support the custom
key as defined by the API. https://explorer.docs.rollbar.com/#operation/create-item
Maybe a config option for this is the best way to meet both needs.
* add lightstep integration * separate validation of tracer + span b/c we dont always have an active span when validating tracer at client instantiation * add item.custom data to custom field in browserjs implementation * move tracer config to Client rather than each implementation * revert spreading of data.custom attrs to root data obj in browserjs * add item.data.custom to all occurrences for both nodejs and browserjs * add item.data.custom for react-native too
These changes allow for a rollbar.js user to inject an OpenTracing tracer object as a configuration option.
Whenever an error or message is logged via Rollbar we will check if the client has as tracer set. If that tracer is valid then we set the new occurrence UUID as metadata on the opentracing span as well as add the opentracing trace ID and span ID to the occurrence as custom metadata.
Implementation Examples
automatic instrumentation
manual instrumentation