nexus_semantic_logger 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -0
- data/lib/nexus_semantic_logger/datadog_singleton.rb +2 -1
- data/lib/nexus_semantic_logger/version.rb +2 -2
- data/lib/nexus_semantic_logger.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d90e3661ba7e5c82b2e1777d465df8f88617a3ad8287f8d0b9bdd461f0729a6
|
4
|
+
data.tar.gz: 1217216fdf855b72558510e52a50f0308c10b3e07ccbc80369fb228f0fe51040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4261cc18604aade1ebd48efcd2cbb680ee26da22c366bcb544c786d42bffdad1a57ec2249f53347f1bcb5dadd2b0c13ff20f8699a7e30131e1e85fb7f1d2244
|
7
|
+
data.tar.gz: f2ea77247cc5e769e1dc7706595b85dc62179ceef8d05f11d78904632cd6cb39c837d64e401e278edf52333a75552dc6de41634f8b6862ac26155d528de9397b
|
data/README.md
CHANGED
@@ -2,6 +2,27 @@
|
|
2
2
|
|
3
3
|
Configures a [semantic_logger](https://rubygems.org/gems/rails_semantic_logger) as required for NexusMods components.
|
4
4
|
|
5
|
+
## Telemetry
|
6
|
+
|
7
|
+
As well as providing a semantic logger, this gem handles datadog telemetry associated with the logging approach:
|
8
|
+
|
9
|
+
* logs
|
10
|
+
* traces
|
11
|
+
* metrics
|
12
|
+
* statsd is automatically attached to datadog runtime metrics and may also be used for custom metrics.
|
13
|
+
|
14
|
+
### Sending metrics
|
15
|
+
|
16
|
+
Ensure the metric name is in the format: `nexus.{component}.{major}.{minor}`
|
17
|
+
|
18
|
+
Where _major and minor_ are specific to the component logic e.g. `nexus.uploads.clamscan.pass`
|
19
|
+
|
20
|
+
For example, to increment a count:
|
21
|
+
|
22
|
+
```
|
23
|
+
NexusSemanticLogger.metrics.increment('nexus.users.registration.complete')
|
24
|
+
```
|
25
|
+
|
5
26
|
# Local gem development
|
6
27
|
|
7
28
|
Steps to run this gem from local sources in one the nexus 'staged build' rails components:
|
@@ -3,7 +3,8 @@ require 'singleton'
|
|
3
3
|
|
4
4
|
module NexusSemanticLogger
|
5
5
|
# Application wide location to get datadog objects.
|
6
|
-
#
|
6
|
+
# dogstatsd-ruby maintains its own queue and thread for flushing, so the client code should never create its
|
7
|
+
# own statsd instance.
|
7
8
|
class DatadogSingleton
|
8
9
|
include Singleton
|
9
10
|
attr_accessor :statsd, :tags
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module NexusSemanticLogger
|
3
|
-
# Leave this as 1.
|
4
|
-
VERSION = '1.
|
3
|
+
# Leave this as 1.3.0 in order for CI process to replace with the tagged version.
|
4
|
+
VERSION = '1.3.0'
|
5
5
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexus_semantic_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johnathon Harris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
rubygems_version: 3.3.
|
105
|
+
rubygems_version: 3.3.21
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: semantic_logger usage for nexus
|