Skip to content
Snippets Groups Projects
Commit d313f799 authored by Theo Cushion's avatar Theo Cushion
Browse files

chore: remove references to NexusSemanticLogger::ResponseCodeStatsMiddleware

parent e27be54b
No related branches found
No related tags found
1 merge request!13chore: remove references to NexusSemanticLogger::ResponseCodeStatsMiddleware
Pipeline #90362 passed
......@@ -10,7 +10,6 @@ As well as providing a semantic logger, this gem handles datadog telemetry assoc
* traces
* metrics
* statsd is automatically attached to datadog runtime metrics and may also be used for custom metrics.
* `ResponseCodeStatsMiddleware` is included to capture response code metrics from rack applications
### Customise log level per logger
......@@ -61,13 +60,6 @@ For example, to increment a count:
NexusSemanticLogger.metrics.increment('nexus.users.registration.complete')
```
### Rack response code metrics
This can be configured with a middleware in application.rb
```
config.middleware.use ResponseCodeStatsMiddleware
```
# Local gem development
Steps to run this gem from local sources in one the nexus 'staged build' rails components:
......
......@@ -164,14 +164,6 @@ Puma::Plugin.create do
NexusSemanticLogger.metrics.gauge('puma.pool_capacity', stats.pool_capacity, tags: tags)
NexusSemanticLogger.metrics.gauge('puma.max_threads', stats.max_threads, tags: tags)
NexusSemanticLogger.metrics.count('puma.requests_count', stats.requests_count, tags: tags)
NexusSemanticLogger::ResponseCodeStatsMiddleware.read_and_reset_metrics.each do |code, count|
NexusSemanticLogger.metrics.count(
"puma.rack.response.status",
count,
tags: tags + ["response_status:#{code}"]
)
end
rescue StandardError => e
@log_writer.unknown_error(e, nil, '! statsd: notify stats failed')
ensure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment