File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,10 @@ func NamespaceTag(namespace string) Tag {
347
347
return metricWithUnknown ("namespace" , namespace )
348
348
}
349
349
350
+ func TaskCategoryTag (category string ) Tag {
351
+ return metricWithUnknown ("task_category" , category )
352
+ }
353
+
350
354
// ReasonTag returns a new reason tag
351
355
func ReasonTag (reason string ) Tag {
352
356
return metricWithUnknown ("reason" , reason )
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ const (
178
178
type HistoryTaskCategory struct {
179
179
categoryType int
180
180
categoryID int
181
+ categoryName string
181
182
}
182
183
183
184
func (c * HistoryTaskCategory ) Type () int {
@@ -188,6 +189,10 @@ func (c *HistoryTaskCategory) ID() int {
188
189
return c .categoryID
189
190
}
190
191
192
+ func (c * HistoryTaskCategory ) Name () string {
193
+ return c .categoryName
194
+ }
195
+
191
196
const (
192
197
HistoryTaskCategoryTypeImmediate = iota + 1
193
198
HistoryTaskCategoryTypeScheduled
@@ -203,14 +208,17 @@ var (
203
208
HistoryTaskCategoryTransfer = HistoryTaskCategory {
204
209
categoryType : HistoryTaskCategoryTypeImmediate ,
205
210
categoryID : HistoryTaskCategoryIDTransfer ,
211
+ categoryName : "transfer" ,
206
212
}
207
213
HistoryTaskCategoryTimer = HistoryTaskCategory {
208
214
categoryType : HistoryTaskCategoryTypeScheduled ,
209
215
categoryID : HistoryTaskCategoryIDTimer ,
216
+ categoryName : "timer" ,
210
217
}
211
218
HistoryTaskCategoryReplication = HistoryTaskCategory {
212
219
categoryType : HistoryTaskCategoryTypeImmediate ,
213
220
categoryID : HistoryTaskCategoryIDReplication ,
221
+ categoryName : "replication" ,
214
222
}
215
223
)
216
224
Original file line number Diff line number Diff line change @@ -438,3 +438,7 @@ func (r GetCurrentExecutionRequest) GetDomainName() string {
438
438
func (r GetCurrentExecutionRequest ) GetExtraLogTags () []tag.Tag {
439
439
return []tag.Tag {tag .WorkflowID (r .WorkflowID )}
440
440
}
441
+
442
+ func (r GetHistoryTasksRequest ) MetricTags () []metrics.Tag {
443
+ return []metrics.Tag {metrics .TaskCategoryTag (r .TaskCategory .Name ())}
444
+ }
You can’t perform that action at this time.
0 commit comments