Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nexus_semantic_logger
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public
nexus_semantic_logger
Commits
fd49cdb7
Commit
fd49cdb7
authored
2 years ago
by
John Harris
Browse files
Options
Downloads
Patches
Plain Diff
fix: add metrics delegate for timing
parent
ff1c8cb8
No related branches found
Branches containing commit
Tags
1.5.1
Tags containing commit
No related merge requests found
Pipeline
#34562
passed
2 years ago
Stage: release
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/nexus_semantic_logger/datadog_singleton.rb
+12
-2
12 additions, 2 deletions
lib/nexus_semantic_logger/datadog_singleton.rb
with
12 additions
and
2 deletions
lib/nexus_semantic_logger/datadog_singleton.rb
+
12
−
2
View file @
fd49cdb7
...
...
@@ -13,8 +13,18 @@ module NexusSemanticLogger
statsd
&
.
flush
(
sync:
Rails
.
env
.
development?
)
# Force flush sync in development, speed up checks.
end
def
increment
(
metric_name
)
statsd
&
.
increment
(
metric_name
,
tags:
tags
)
# Delegate to statsd (if available).
# @param [String] metric Metric name.
def
increment
(
metric
)
statsd
&
.
increment
(
metric
,
tags:
tags
)
flush
end
# Delegate to statsd (if available).
# @param [String] metric Metric name.
# @param [Integer] ms Timing in milliseconds.
def
timing
(
metric
,
ms
)
statsd
&
.
timing
(
metric
,
ms
,
tags:
tags
)
flush
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment