Skip to content

Commit

Permalink
idxmgmt: add "profile" event index
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Nov 27, 2019
1 parent f731269 commit 6b71153
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion idxmgmt/indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func eventIdxNames(dateSuffix bool) map[string]string {
suffix = apmSuffix
}
idcs := map[string]string{}
for _, k := range []string{"span", "transaction", "error", "metric"} {
for _, k := range []string{"span", "transaction", "error", "metric", "profile"} {
idcs[k] = idxStr(k, suffix)
}
return idcs
Expand Down
2 changes: 2 additions & 0 deletions idxmgmt/indices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func TestEventIdxNames(t *testing.T) {
expected := map[string]string{
"error": "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}",
"metric": "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}",
"profile": "apm-%{[observer.version]}-profile-%{+yyyy.MM.dd}",
"span": "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}",
"transaction": "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}",
}
Expand All @@ -40,6 +41,7 @@ func TestEventIdxNames(t *testing.T) {
expected := map[string]string{
"error": "apm-%{[observer.version]}-error",
"metric": "apm-%{[observer.version]}-metric",
"profile": "apm-%{[observer.version]}-profile",
"span": "apm-%{[observer.version]}-span",
"transaction": "apm-%{[observer.version]}-transaction",
}
Expand Down

0 comments on commit 6b71153

Please sign in to comment.