Skip to content

CaptureFeedback, missing environment #4808

Closed

Description

@lucas-zimerman

Package

Sentry

.NET Flavor

.NET

.NET Version

9.0

OS

Android

OS Version

15

Development Environment

Visual Studio v18.x

SDK Version

6.0.0

Self-Hosted Sentry Version

No response

Workload Versions

Workload version: 10.0.101

Installed Workload Id Manifest Version Installation Source

android 36.1.2/10.0.100 SDK 10.0.100, VS 18.1.11304.174, VS 17.14.36804.6
ios 26.1.10502/10.0.100 SDK 10.0.100, VS 18.1.11304.174, VS 17.14.36804.6
maccatalyst 26.1.10502/10.0.100 SDK 10.0.100, VS 18.1.11304.174, VS 17.14.36804.6
maui-android 10.0.1/10.0.100 SDK 10.0.100
maui-windows 10.0.1/10.0.100 SDK 10.0.100, VS 18.1.11304.174, VS 17.14.36804.6

UseSentry or SentrySdk.Init call

        var builder = MauiApp.CreateBuilder();
        builder
            .SetupSentry()
            .UseMauiApp<App>()

...

        builder.UseSentry((option) =>
        {
            option.Native.ExperimentalOptions.SessionReplay.OnErrorSampleRate = 0.1;
            option.Native.ExperimentalOptions.SessionReplay.SessionSampleRate = 0.1;
            option.Native.ExperimentalOptions.SessionReplay.MaskAllText = false;
            option.Native.ExperimentalOptions.SessionReplay.MaskAllImages = false;
            option.ReportAssembliesMode = ReportAssembliesMode.None;
            option.Dsn = EnvironmentConfig.SentryDsn;
...

Steps to Reproduce

initialize sentry, set "Prod" in environments.
capture any error, you will see it has Prod as environment in sentry.io
call
SentrySdk.CaptureFeedback(new SentryFeedback("test", "[email protected]", "test", associatedEventId: SentrySdk.LastEventId));

Expected Result

Sentry.io with Prod on environment

Actual Result

Image

Activity

  1. added
    Bug
    .NET
    on Dec 12, 2025
  2. Flash0ver commented on Dec 15, 2025

    @Flash0ver
    Contributor

    @lucas-zimerman, thanks for the report.

    This seems to be a general issue, not just an issue with the MAUI / Android integration.

    From a console app:

    SentrySdk.Init(options =>
    {
      //..
      options.AutoSessionTracking = true;
      options.Environment = "Prod";
    });
    
    SentrySdk.CaptureFeedback(new SentryFeedback("test", "[email protected]", "test"));
    

    sends two envelopes:

    1. a "session" that contains "attrs": { "environment": "Prod" }
    2. a "feedback" that does not contain the environment, but displays production in Sentry per default
  3. lucas-zimerman commented on Feb 12, 2026

    @lucas-zimerman
    CollaboratorAuthor

    I also noticed that it's also missing the release from the project being used.

  4. added a commit that references this issue on Feb 23, 2026
    3400f00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETBug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions