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

DefaultTags in SentryBuildTimeOptionsConfiguration don't show up #1573

Open
polynatic opened this issue Mar 4, 2024 · 3 comments
Open

DefaultTags in SentryBuildTimeOptionsConfiguration don't show up #1573

polynatic opened this issue Mar 4, 2024 · 3 comments
Assignees

Comments

@polynatic
Copy link

polynatic commented Mar 4, 2024

Environment

How do you use Sentry?
Sentry SaaS

Which version of the SDK?
2.0.0

How did you install the package? (Git-URL, Assetstore)
UPM Git-URL

Which version of Unity?
2022.3.20

Is this happening in Unity (editor) or on a player like Android, iOS, Windows?
iOS player, no other platform tested

Steps to Reproduce

public class SentryBuildTimeConfiguration : SentryBuildTimeOptionsConfiguration
{
    public override void Configure(SentryUnityOptions options, SentryCliOptions cliOptions)
    {
        options.DefaultTags.Add("branch", GetGitBranch());
    }
}
  1. Create Build
  2. Run on Device

Expected Result

The branch tag appears on all Sentry events coming from this build.

Actual Result

The tag is not present on any Sentry events.

@bitsandfoxes
Copy link
Contributor

Sorry for the confusion.
The build-time options are purely used during build-time. They give you a place to hook into the CLI options and to modify mobile (iOS & Android) specific options that cannot be modified during runtime. I.e. environment or release.
Tags will get propagated to all layers when set during runtime so adding those to the runtime options should do the trick.

@polynatic
Copy link
Author

Alright, thanks! It would be nice if the documentation would be more clear on what properties can be set during build time, which can't be set and which ones must be set there.

@bitsandfoxes
Copy link
Contributor

Very true. We'll update those asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Waiting for: Product Owner
Development

No branches or pull requests

2 participants