Skip to content

codeVersion (and code_version) options confusing on browser targetsΒ #842

Open
@lennartbuit

Description

@lennartbuit

I am bundling rollbar in my webpack build, so I am importing rollbar from its npm package. E.g.

import Rollbar from 'rollbar';


// ... somewhere else
new Rollbar({ accessToken: ..., ... })

The Rollbar constructor accepts a bunch of options, and the type definition says that it should accept code_version as well as codeVersion (here).

Furthermore, the rollbar documentation says that code version should be shown in the UI under the client.javascript.code_version key for it to work with (f.e.) source maps.

However, both options are not recognised as 'special' on the browser target, and instead end up in notifier.configured_options.codeVersion, leading to trying to match source maps for the unknown version.

this issue suggests not using the toplevel options and instead (manually) adding them via the payload option. This works, but it is confusing to me that the type definition says the constructor accepts codeVersion and/or code_version, but doesn't assign the (to me) expected significance to these keys on the browser target.

Is it possible to have a seperate type definition for the browser target, or assign the significance on the browser target as well, or amend this documentation example with configuration for this code version feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions