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

code_version setting is NOT in the expected location of the payload. Versions functionality doesn’t work #635

Open
Raymondloh2022 opened this issue Oct 7, 2022 · 2 comments

Comments

@Raymondloh2022
Copy link

Describe the bug
CodeVersion is an attribute that Rollbar allows us to affiliate when sending payload to Rollbar. The expected location in the payload is documented in create-item documentation (https://docs.rollbar.com/reference/create-item). (Search for code_version)

What users have experienced from .Net SDK is finding codeversion value declared under config.RollbarPayloadAdditionOptions.CodeVersion instead. Since it is in the incorrect location, the payload version functionality does not work.

With that, Rollbar won't recognize this as the version of the code specifically

  1. There's no hyperlink to github or Rollbar version screen in the occurrence detail page.
  2. There's no version data shows up in the version screen

To Reproduce

  1. Initialize Rollbar in the .Net app
  2. Add code version as config.RollbarPayloadAdditionOptions.CodeVersion as follow
    config.RollbarPayloadAdditionOptions.CodeVersion = "1.0.0";
  3. Submit an item to Rollbar
  4. Review the occurrence under occurrence detail
  5. See the code version attribute is not in visible but instead config.RollbarPayloadAdditionOptions.CodeVersion with a non link-able commit key.

Suggestion
It would be great if code_version was a parameter to this method
// create valid Rollbar configuration:
RollbarInfrastructureConfig rollbarInfrastructureConfig =
new RollbarInfrastructureConfig(
RollbarSamplesSettings.AccessToken,
RollbarSamplesSettings.Environment
);

@Raymondloh2022
Copy link
Author

@finbar-rollbar ; FYI
@phil-losty-rb FYI
@rollbar-bborsits FYI

@TheDevFactory
Copy link
Member

Here is an example with additional payload options...

        const string rollbarAccessToken = "TOKEN";
        const string rollbarEnvironment = "ENVIRONMENT";

        RollbarInfrastructureConfig config = new RollbarInfrastructureConfig(
          rollbarAccessToken,
          rollbarEnvironment
        );

        Rollbar.DTOs.Server rollbarServerConfig = new Rollbar.DTOs.Server();
        RollbarPayloadAdditionOptions addconfig = new RollbarPayloadAdditionOptions();

        rollbarServerConfig.Host = "[myapp.com](http://myapp.com/)";
        rollbarServerConfig.CodeVersion = "1.0.0";

        addconfig.Server = rollbarServerConfig;
        addconfig.CodeVersion = "1.0.0";

        config.RollbarLoggerConfig.RollbarPayloadAdditionOptions.Reconfigure(addconfig);

        //RollbarDataSecurityOptions dataSecurityOptions = new RollbarDataSecurityOptions();
        //dataSecurityOptions.ScrubFields = new string[]
        //{
        //  "url",
        //  "method",
        //};
        //config.RollbarLoggerConfig.RollbarDataSecurityOptions.Reconfigure(dataSecurityOptions);

        RollbarInfrastructure.Instance.Init(config);

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

2 participants