Skip to content

Commit

Permalink
allow mixed case env tags
Browse files Browse the repository at this point in the history
  • Loading branch information
greywolve committed Sep 20, 2023
1 parent 7267779 commit 9fff438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ func loadEnvTags() map[string]string {
continue
}
tag := strings.TrimPrefix(parts[0], envTagsPrefix)
tag = strings.ToLower(tag)
tags[tag] = parts[1]
}
return tags
Expand Down
12 changes: 6 additions & 6 deletions integrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,12 @@ func TestEnvironmentIntegrationDoesNotOverrideExistingContexts(t *testing.T) {
}

func TestGlobalTagsIntegration(t *testing.T) {
os.Setenv("SENTRY_TAGS_FOO", "foo_value_env")
os.Setenv("SENTRY_TAGS_BAR", "bar_value_env")
os.Setenv("SENTRY_TAGS_BAZ", "baz_value_env")
defer os.Unsetenv("SENTRY_TAGS_FOO")
defer os.Unsetenv("SENTRY_TAGS_BAR")
defer os.Unsetenv("SENTRY_TAGS_BAZ")
os.Setenv("SENTRY_TAGS_foo", "foo_value_env")
os.Setenv("SENTRY_TAGS_bar", "bar_value_env")
os.Setenv("SENTRY_TAGS_baz", "baz_value_env")
defer os.Unsetenv("SENTRY_TAGS_foo")
defer os.Unsetenv("SENTRY_TAGS_bar")
defer os.Unsetenv("SENTRY_TAGS_baz")

transport := &TransportMock{}
client, err := NewClient(ClientOptions{
Expand Down

0 comments on commit 9fff438

Please sign in to comment.