Skip to content

Commit

Permalink
add note in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalSkolasinski authored and seldondev committed Mar 27, 2020
1 parent c330b23 commit aa72cbd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/source/python/python_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ class ModelWithMetrics(object):

def metrics(self):
return [
{"type":"COUNTER","key":"mycounter","value":1}, # a counter which will increase by the given value
{"type":"GAUGE","key":"mygauge","value":100}, # a gauge which will be set to given value
{"type":"TIMER","key":"mytimer","value":20.2}, # a timer which will add sum and count metrics - assumed millisecs
]

{"type": "COUNTER", "key": "mycounter", "value": 1}, # a counter which will increase by the given value
{"type": "GAUGE", "key": "mygauge", "value": 100}, # a gauge which will be set to given value
{"type": "TIMER", "key": "mytimer", "value": 20.2}, # a timer which will add sum and count metrics - assumed millisecs
]
```

Note: prior to Seldon Core 1.1 custom metrics have always been returned to client. From SC 1.1 you can control this behaviour setting `INCLUDE_METRICS_IN_CLIENT_RESPONSE` environmental variable to either `true` or `false`. Despite value of this environmental variable custom metrics will always be exposed to Prometheus.


## Returning Tags

If we wish to add arbitrary tags to the returned metadata you can provide a `tags` method with signature as shown below:
Expand Down

0 comments on commit aa72cbd

Please sign in to comment.