getsentry / getsentry/sentry-php

Regex/glob support in prefixes configuration

Open
#1,932 3 comments 0 reactions 0 assignees View on GitHub
Feature PHP
Dominant language
PHP
Stars
1.9k
Forks
474
Avg merge
2d 3h
Merged PRs (30d)
8

Description

### Problem Statement

For our projects we use atomic/zero-downtime deployments, meaning the location of the code changes. E.g:
- /path/to/project/releases/16
- /path/to/project/releases/17
- /path/to/project/releases/18

Right now this would require us to update the prefixes config every time

### Solution Brainstorm

What would really help here would be to allow regexes in the prefix config, allowing us to go from

```php
[
'prefixes' => [
'/path/to/project/releases/16'/,
'/path/to/project/releases/17'/,
'/path/to/project/releases/18/',
]
]
```

to

```php
[
'prefixes' => [
'/path/to/project/releases/[0-9]+/', // regex
'/path/to/project/releases/*/', // or Glob
]
]
```

(due to paths already starting and ending with `/`, implementing globs might be an easier solution)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.