This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add telemetry for
metrics_ingestion_path
& json_endpoint_used
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
- Loading branch information
1 parent
c80f69c
commit 6eaf1fe
Showing
6 changed files
with
75 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// This file and its contents are licensed under the Apache License 2.0. | ||
// Please see the included NOTICE for copyright information and | ||
// LICENSE for a copy of the license. | ||
|
||
package telemetry | ||
|
||
import "sync" | ||
|
||
type reg struct { | ||
r sync.Map | ||
} | ||
|
||
func (r *reg) Update(telemetryName, value string) { | ||
r.r.Store(telemetryName, value) | ||
} | ||
|
||
func (r *reg) metadata() (m Metadata) { | ||
m = Metadata{} | ||
r.r.Range(func(telemetryName, value interface{}) bool { | ||
m[telemetryName.(string)] = value.(string) | ||
return true | ||
}) | ||
return m | ||
} | ||
|
||
// Registry is a telemetry holder that is mutable and can be filled from anywhere in Promscale. | ||
var Registry reg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters