-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from perses/nexucis/update
Nexucis/update
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
name: Bug report | ||
description: Create a report to help us improve. | ||
labels: [ "bug" ] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for opening a bug report for MetricUsage. | ||
Please do *NOT* ask support questions in Github issues. | ||
If your issue is not a feature request or bug report contact us directly on slack. | ||
- type: textarea | ||
attributes: | ||
label: What did you do? | ||
description: Please provide steps for us to reproduce this issue. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: What did you expect to see? | ||
- type: textarea | ||
attributes: | ||
label: What did you see instead? Under which circumstances? | ||
validations: | ||
required: true | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## Environment | ||
- type: input | ||
attributes: | ||
label: System information | ||
description: insert output of `uname -srm` here, or operating system version | ||
placeholder: e.g. Linux 5.16.15 x86_64 | ||
- type: input | ||
attributes: | ||
label: MetricsUsage version | ||
description: Insert the MetricsUsage version here. | ||
placeholder: e.g. 0.3.0 | ||
- type: textarea | ||
attributes: | ||
label: MetricsUsage configuration file | ||
description: Insert relevant configuration here. Don't forget to remove secrets. | ||
render: yaml | ||
- type: textarea | ||
attributes: | ||
label: Logs | ||
description: Insert MetricsUsage logs relevant to the issue here. | ||
render: text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package prometheus | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestExtractMetricNamesFromPromQL(t *testing.T) { | ||
result, err := ExtractMetricNamesFromPromQL("service_status{env=~\"$env\",region=~\"$region\"}") | ||
assert.NoError(t, err) | ||
assert.Equal(t, []string{"service_status"}, result) | ||
} |