mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
feat: drop x- header prefix (#9175)
This commit is contained in:
parent
b04079c82d
commit
77cb30a82f
@ -271,7 +271,7 @@ export function registerPrometheusMetrics(
|
||||
|
||||
dbMetrics.registerGaugeDbMetric({
|
||||
name: 'unique_sdk_connections_total',
|
||||
help: 'The number of unique SDK connections for the full previous hour across all instances. Available only for SDKs reporting `unleash-x-connection-id`',
|
||||
help: 'The number of unique SDK connections for the full previous hour across all instances. Available only for SDKs reporting `unleash-connection-id`',
|
||||
query: () => {
|
||||
if (flagResolver.isEnabled('uniqueSdkTracking')) {
|
||||
return stores.uniqueConnectionReadModel.getStats();
|
||||
@ -283,7 +283,7 @@ export function registerPrometheusMetrics(
|
||||
|
||||
dbMetrics.registerGaugeDbMetric({
|
||||
name: 'unique_backend_sdk_connections_total',
|
||||
help: 'The number of unique backend SDK connections for the full previous hour across all instances. Available only for SDKs reporting `unleash-x-connection-id`',
|
||||
help: 'The number of unique backend SDK connections for the full previous hour across all instances. Available only for SDKs reporting `unleash-connection-id`',
|
||||
query: () => {
|
||||
if (flagResolver.isEnabled('uniqueSdkTracking')) {
|
||||
return stores.uniqueConnectionReadModel.getStats();
|
||||
@ -295,7 +295,7 @@ export function registerPrometheusMetrics(
|
||||
|
||||
dbMetrics.registerGaugeDbMetric({
|
||||
name: 'unique_frontend_sdk_connections_total',
|
||||
help: 'The number of unique frontend SDK connections for the full previous hour across all instances. Available only for SDKs reporting `unleash-x-connection-id`',
|
||||
help: 'The number of unique frontend SDK connections for the full previous hour across all instances. Available only for SDKs reporting `unleash-connection-id`',
|
||||
query: () => {
|
||||
if (flagResolver.isEnabled('uniqueSdkTracking')) {
|
||||
return stores.uniqueConnectionReadModel.getStats();
|
||||
|
@ -68,6 +68,7 @@ export function responseTimeMetrics(
|
||||
|
||||
if (flagResolver.isEnabled('uniqueSdkTracking')) {
|
||||
const connectionId =
|
||||
req.headers['unleash-connection-id'] ||
|
||||
req.headers['x-unleash-connection-id'] ||
|
||||
req.headers['unleash-instanceid'];
|
||||
if (req.originalUrl.includes('/api/client') && connectionId) {
|
||||
|
Loading…
Reference in New Issue
Block a user