getsentry / getsentry/sentry

Environment not created/shown when only log events exist for that environment

Open
#104,527 12 comments 0 reactions 0 assignees View on GitHub
Bug Explore > Logs Product Area: Explore
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
22h 21m
Merged PRs (30d)
586

Description

### Environment

SaaS (https://sentry.io/)

### Steps to Reproduce

Reported via [Zendesk](https://sentry.zendesk.com/agent/tickets/169374) and reproduced in my org: When sending only log events with a specific environment (no error, transaction, sessions event), that environment never appears in the "All Envs" dropdown in the Sentry UI.

Steps to Reproduce

- Create or use a project with no existing events for a given environment (e.g. logs-only-env).
- Send a log event to that project with environment set. (No error events or other event types are sent for that environment.)
- Go to the Logs view
- Open the Environments dropdown.

[Link to org](https://org2-w7.sentry.io/explore/logs/?logsFields=timestamp&logsFields=message&logsSortBys=-timestamp&project=4507222881075200&statsPeriod=7d)
Image

### Expected Result

The environment used on those log events appears in the Environments dropdown.

### Actual Result

The environment used on those log events never appears in the Environments dropdown.

### Product Area

Explore

### Link

_No response_

### DSN

_No response_

### Version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue from the Logs view using a project with only log events in a new environment, then inspect how the Environments dropdown is populated. Done means the environment used by those log events appears in the dropdown even when no other event types exist.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.