Compare commits

..

10 Commits

Author SHA1 Message Date
Abhi kumar
e696466a72 Merge branch 'main' into fix/issue-6354 2026-02-23 22:20:39 +05:30
Vikrant Gupta
e8add5942e feat(authz): update authz response to prevent pre-compute (#10385)
Some checks are pending
build-staging / prepare (push) Waiting to run
build-staging / js-build (push) Blocked by required conditions
build-staging / go-build (push) Blocked by required conditions
build-staging / staging (push) Blocked by required conditions
Release Drafter / update_release_draft (push) Waiting to run
* feat(authz): update get/patch objects request response

* feat(authz): improve handling for openapi spec

* fix(authz): js tests

* fix(authz): js tests

* feat(authz): fix name and selectors
2026-02-23 22:19:28 +05:30
Karan Balani
ddecf05d9f fix: omit unset limit values in gateway update api payload (#10388)
* fix: limit value size and count to pointers with omitempty

* fix: openapi specs backend

* fix: openapi specs frontend

* chore: add go tests for limits validations

* fix: liniting issues

* test: remove go test and add gateway integration tests with mocked gateway for all gateway apis

* feat: add gateway in integration ci src matrix

* chore: divide tests into multiple files for keys and limits and utilities

* fix: creation ingestion key returns 201, check for actual values in tests

* fix: creation ingestion key returns 201, check for actual values in tests

* fix: create ingestion key gateway api mock status code as 201
2026-02-23 16:08:40 +00:00
Abhi kumar
a7238a9766 Merge branch 'main' into fix/issue-6354 2026-02-23 19:27:42 +05:30
Abhi kumar
d96f79c584 Merge branch 'main' into fix/issue-6354 2026-02-23 18:45:04 +05:30
Abhi Kumar
5db92b46eb chore: minor change 2026-02-23 18:36:21 +05:30
Abhi Kumar
cb6db1bfdf fix: fixed failing tests 2026-02-23 18:17:32 +05:30
Abhi Kumar
5133346f77 Merge branch 'main' of https://github.com/SigNoz/signoz into fix/issue-6354 2026-02-23 16:58:31 +05:30
Abhi Kumar
d48495aecc fix: fixed tsc 2026-02-23 16:58:14 +05:30
Abhi Kumar
53d7753167 fix: fixed unit converstion support across thresholds and yaxisunit 2026-02-23 16:32:25 +05:30
45 changed files with 1591 additions and 2829 deletions

View File

@@ -48,6 +48,7 @@ jobs:
- role
- ttl
- alerts
- ingestionkeys
sqlstore-provider:
- postgres
- sqlite

View File

@@ -80,6 +80,37 @@ components:
updatedAt:
format: date-time
type: string
required:
- id
type: object
AuthtypesGettableObjects:
properties:
resource:
$ref: '#/components/schemas/AuthtypesResource'
selectors:
items:
type: string
type: array
required:
- resource
- selectors
type: object
AuthtypesGettableResources:
properties:
relations:
additionalProperties:
items:
type: string
type: array
nullable: true
type: object
resources:
items:
$ref: '#/components/schemas/AuthtypesResource'
type: array
required:
- resources
- relations
type: object
AuthtypesGettableToken:
properties:
@@ -130,8 +161,6 @@ components:
serviceAccountJson:
type: string
type: object
AuthtypesName:
type: object
AuthtypesOIDCConfig:
properties:
claimMapping:
@@ -154,7 +183,7 @@ components:
resource:
$ref: '#/components/schemas/AuthtypesResource'
selector:
$ref: '#/components/schemas/AuthtypesSelector'
type: string
required:
- resource
- selector
@@ -175,6 +204,22 @@ components:
provider:
type: string
type: object
AuthtypesPatchableObjects:
properties:
additions:
items:
$ref: '#/components/schemas/AuthtypesGettableObjects'
nullable: true
type: array
deletions:
items:
$ref: '#/components/schemas/AuthtypesGettableObjects'
nullable: true
type: array
required:
- additions
- deletions
type: object
AuthtypesPostableAuthDomain:
properties:
config:
@@ -199,7 +244,7 @@ components:
AuthtypesResource:
properties:
name:
$ref: '#/components/schemas/AuthtypesName'
type: string
type:
type: string
required:
@@ -231,8 +276,6 @@ components:
samlIdp:
type: string
type: object
AuthtypesSelector:
type: object
AuthtypesSessionContext:
properties:
exists:
@@ -245,8 +288,6 @@ components:
type: object
AuthtypesTransaction:
properties:
id:
type: string
object:
$ref: '#/components/schemas/AuthtypesObject'
relation:
@@ -460,10 +501,10 @@ components:
GatewaytypesLimitValue:
properties:
count:
format: int64
nullable: true
type: integer
size:
format: int64
nullable: true
type: integer
type: object
GatewaytypesPagination:
@@ -801,14 +842,6 @@ components:
- temporality
- isMonotonic
type: object
MetrictypesComparisonSpaceAggregationParam:
properties:
operator:
type: string
threshold:
format: double
type: number
type: object
MetrictypesSpaceAggregation:
enum:
- sum
@@ -821,7 +854,6 @@ components:
- p90
- p95
- p99
- histogram_count
type: string
MetrictypesTemporality:
enum:
@@ -1106,8 +1138,6 @@ components:
type: object
Querybuildertypesv5MetricAggregation:
properties:
comparisonSpaceAggregationParam:
$ref: '#/components/schemas/MetrictypesComparisonSpaceAggregationParam'
metricName:
type: string
reduceTo:
@@ -1679,40 +1709,6 @@ components:
- status
- error
type: object
RoletypesGettableResources:
properties:
relations:
additionalProperties:
items:
type: string
type: array
nullable: true
type: object
resources:
items:
$ref: '#/components/schemas/AuthtypesResource'
nullable: true
type: array
required:
- resources
- relations
type: object
RoletypesPatchableObjects:
properties:
additions:
items:
$ref: '#/components/schemas/AuthtypesObject'
nullable: true
type: array
deletions:
items:
$ref: '#/components/schemas/AuthtypesObject'
nullable: true
type: array
required:
- additions
- deletions
type: object
RoletypesPatchableRole:
properties:
description:
@@ -1748,6 +1744,7 @@ components:
format: date-time
type: string
required:
- id
- name
- description
- type
@@ -1885,6 +1882,8 @@ components:
$ref: '#/components/schemas/TypesUser'
userId:
type: string
required:
- id
type: object
TypesGettableGlobalConfig:
properties:
@@ -1897,6 +1896,8 @@ components:
properties:
id:
type: string
required:
- id
type: object
TypesInvite:
properties:
@@ -1920,6 +1921,8 @@ components:
updatedAt:
format: date-time
type: string
required:
- id
type: object
TypesOrganization:
properties:
@@ -1940,6 +1943,8 @@ components:
updatedAt:
format: date-time
type: string
required:
- id
type: object
TypesPostableAPIKey:
properties:
@@ -2003,6 +2008,8 @@ components:
type: string
token:
type: string
required:
- id
type: object
TypesStorableAPIKey:
properties:
@@ -2028,6 +2035,8 @@ components:
type: string
userId:
type: string
required:
- id
type: object
TypesUser:
properties:
@@ -2049,6 +2058,8 @@ components:
updatedAt:
format: date-time
type: string
required:
- id
type: object
ZeustypesGettableHost:
properties:
@@ -2181,6 +2192,35 @@ paths:
summary: Check permissions
tags:
- authz
/api/v1/authz/resources:
get:
deprecated: false
description: Gets all the available resources
operationId: AuthzResources
responses:
"200":
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/AuthtypesGettableResources'
status:
type: string
required:
- status
- data
type: object
description: OK
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/RenderErrorResponse'
description: Internal Server Error
summary: Get resources
tags:
- authz
/api/v1/changePassword/{id}:
post:
deprecated: false
@@ -4353,7 +4393,7 @@ paths:
properties:
data:
items:
$ref: '#/components/schemas/AuthtypesObject'
$ref: '#/components/schemas/AuthtypesGettableObjects'
type: array
status:
type: string
@@ -4426,7 +4466,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/RoletypesPatchableObjects'
$ref: '#/components/schemas/AuthtypesPatchableObjects'
responses:
"204":
content:
@@ -4484,52 +4524,6 @@ paths:
summary: Patch objects for a role by relation
tags:
- role
/api/v1/roles/resources:
get:
deprecated: false
description: Gets all the available resources for role assignment
operationId: GetResources
responses:
"200":
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/RoletypesGettableResources'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/RenderErrorResponse'
description: Unauthorized
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/RenderErrorResponse'
description: Forbidden
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/RenderErrorResponse'
description: Internal Server Error
security:
- api_key:
- ADMIN
- tokenizer:
- ADMIN
summary: Get resources
tags:
- role
/api/v1/user:
get:
deprecated: false
@@ -5102,7 +5096,7 @@ paths:
schema:
$ref: '#/components/schemas/GatewaytypesPostableIngestionKey'
responses:
"200":
"201":
content:
application/json:
schema:
@@ -5115,7 +5109,7 @@ paths:
- status
- data
type: object
description: OK
description: Created
"401":
content:
application/json:

View File

@@ -171,8 +171,6 @@ func (provider *provider) GetResources(_ context.Context) []*authtypes.Resource
for _, register := range provider.registry {
typeables = append(typeables, register.MustGetTypeables()...)
}
// role module cannot self register itself!
typeables = append(typeables, provider.MustGetTypeables()...)
resources := make([]*authtypes.Resource, 0)
for _, typeable := range typeables {
@@ -259,7 +257,7 @@ func (provider *provider) Delete(ctx context.Context, orgID valuer.UUID, id valu
}
role := roletypes.NewRoleFromStorableRole(storableRole)
err = role.CanEditDelete()
err = role.ErrIfManaged()
if err != nil {
return err
}

View File

@@ -5,17 +5,24 @@
* SigNoz
*/
import type {
InvalidateOptions,
MutationFunction,
QueryClient,
QueryFunction,
QueryKey,
UseMutationOptions,
UseMutationResult,
UseQueryOptions,
UseQueryResult,
} from 'react-query';
import { useMutation } from 'react-query';
import { useMutation, useQuery } from 'react-query';
import type { BodyType, ErrorType } from '../../../generatedAPIInstance';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type {
AuthtypesTransactionDTO,
AuthzCheck200,
AuthzResources200,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
@@ -106,3 +113,88 @@ export const useAuthzCheck = <
return useMutation(mutationOptions);
};
/**
* Gets all the available resources
* @summary Get resources
*/
export const authzResources = (signal?: AbortSignal) => {
return GeneratedAPIInstance<AuthzResources200>({
url: `/api/v1/authz/resources`,
method: 'GET',
signal,
});
};
export const getAuthzResourcesQueryKey = () => {
return [`/api/v1/authz/resources`] as const;
};
export const getAuthzResourcesQueryOptions = <
TData = Awaited<ReturnType<typeof authzResources>>,
TError = ErrorType<RenderErrorResponseDTO>
>(options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof authzResources>>,
TError,
TData
>;
}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getAuthzResourcesQueryKey();
const queryFn: QueryFunction<Awaited<ReturnType<typeof authzResources>>> = ({
signal,
}) => authzResources(signal);
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited<ReturnType<typeof authzResources>>,
TError,
TData
> & { queryKey: QueryKey };
};
export type AuthzResourcesQueryResult = NonNullable<
Awaited<ReturnType<typeof authzResources>>
>;
export type AuthzResourcesQueryError = ErrorType<RenderErrorResponseDTO>;
/**
* @summary Get resources
*/
export function useAuthzResources<
TData = Awaited<ReturnType<typeof authzResources>>,
TError = ErrorType<RenderErrorResponseDTO>
>(options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof authzResources>>,
TError,
TData
>;
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
const queryOptions = getAuthzResourcesQueryOptions(options);
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
queryKey: QueryKey;
};
query.queryKey = queryOptions.queryKey;
return query;
}
/**
* @summary Get resources
*/
export const invalidateAuthzResources = async (
queryClient: QueryClient,
options?: InvalidateOptions,
): Promise<QueryClient> => {
await queryClient.invalidateQueries(
{ queryKey: getAuthzResourcesQueryKey() },
options,
);
return queryClient;
};

View File

@@ -20,7 +20,7 @@ import { useMutation, useQuery } from 'react-query';
import type { BodyType, ErrorType } from '../../../generatedAPIInstance';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type {
CreateIngestionKey200,
CreateIngestionKey201,
CreateIngestionKeyLimit201,
CreateIngestionKeyLimitPathParameters,
DeleteIngestionKeyLimitPathParameters,
@@ -151,7 +151,7 @@ export const createIngestionKey = (
gatewaytypesPostableIngestionKeyDTO: BodyType<GatewaytypesPostableIngestionKeyDTO>,
signal?: AbortSignal,
) => {
return GeneratedAPIInstance<CreateIngestionKey200>({
return GeneratedAPIInstance<CreateIngestionKey201>({
url: `/api/v2/gateway/ingestion_keys`,
method: 'POST',
headers: { 'Content-Type': 'application/json' },

View File

@@ -20,18 +20,17 @@ import { useMutation, useQuery } from 'react-query';
import type { BodyType, ErrorType } from '../../../generatedAPIInstance';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type {
AuthtypesPatchableObjectsDTO,
CreateRole201,
DeleteRolePathParameters,
GetObjects200,
GetObjectsPathParameters,
GetResources200,
GetRole200,
GetRolePathParameters,
ListRoles200,
PatchObjectsPathParameters,
PatchRolePathParameters,
RenderErrorResponseDTO,
RoletypesPatchableObjectsDTO,
RoletypesPatchableRoleDTO,
RoletypesPostableRoleDTO,
} from '../sigNoz.schemas';
@@ -575,13 +574,13 @@ export const invalidateGetObjects = async (
*/
export const patchObjects = (
{ id, relation }: PatchObjectsPathParameters,
roletypesPatchableObjectsDTO: BodyType<RoletypesPatchableObjectsDTO>,
authtypesPatchableObjectsDTO: BodyType<AuthtypesPatchableObjectsDTO>,
) => {
return GeneratedAPIInstance<string>({
url: `/api/v1/roles/${id}/relation/${relation}/objects`,
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
data: roletypesPatchableObjectsDTO,
data: authtypesPatchableObjectsDTO,
});
};
@@ -594,7 +593,7 @@ export const getPatchObjectsMutationOptions = <
TError,
{
pathParams: PatchObjectsPathParameters;
data: BodyType<RoletypesPatchableObjectsDTO>;
data: BodyType<AuthtypesPatchableObjectsDTO>;
},
TContext
>;
@@ -603,7 +602,7 @@ export const getPatchObjectsMutationOptions = <
TError,
{
pathParams: PatchObjectsPathParameters;
data: BodyType<RoletypesPatchableObjectsDTO>;
data: BodyType<AuthtypesPatchableObjectsDTO>;
},
TContext
> => {
@@ -620,7 +619,7 @@ export const getPatchObjectsMutationOptions = <
Awaited<ReturnType<typeof patchObjects>>,
{
pathParams: PatchObjectsPathParameters;
data: BodyType<RoletypesPatchableObjectsDTO>;
data: BodyType<AuthtypesPatchableObjectsDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -634,7 +633,7 @@ export const getPatchObjectsMutationOptions = <
export type PatchObjectsMutationResult = NonNullable<
Awaited<ReturnType<typeof patchObjects>>
>;
export type PatchObjectsMutationBody = BodyType<RoletypesPatchableObjectsDTO>;
export type PatchObjectsMutationBody = BodyType<AuthtypesPatchableObjectsDTO>;
export type PatchObjectsMutationError = ErrorType<RenderErrorResponseDTO>;
/**
@@ -649,7 +648,7 @@ export const usePatchObjects = <
TError,
{
pathParams: PatchObjectsPathParameters;
data: BodyType<RoletypesPatchableObjectsDTO>;
data: BodyType<AuthtypesPatchableObjectsDTO>;
},
TContext
>;
@@ -658,7 +657,7 @@ export const usePatchObjects = <
TError,
{
pathParams: PatchObjectsPathParameters;
data: BodyType<RoletypesPatchableObjectsDTO>;
data: BodyType<AuthtypesPatchableObjectsDTO>;
},
TContext
> => {
@@ -666,88 +665,3 @@ export const usePatchObjects = <
return useMutation(mutationOptions);
};
/**
* Gets all the available resources for role assignment
* @summary Get resources
*/
export const getResources = (signal?: AbortSignal) => {
return GeneratedAPIInstance<GetResources200>({
url: `/api/v1/roles/resources`,
method: 'GET',
signal,
});
};
export const getGetResourcesQueryKey = () => {
return [`/api/v1/roles/resources`] as const;
};
export const getGetResourcesQueryOptions = <
TData = Awaited<ReturnType<typeof getResources>>,
TError = ErrorType<RenderErrorResponseDTO>
>(options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof getResources>>,
TError,
TData
>;
}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetResourcesQueryKey();
const queryFn: QueryFunction<Awaited<ReturnType<typeof getResources>>> = ({
signal,
}) => getResources(signal);
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited<ReturnType<typeof getResources>>,
TError,
TData
> & { queryKey: QueryKey };
};
export type GetResourcesQueryResult = NonNullable<
Awaited<ReturnType<typeof getResources>>
>;
export type GetResourcesQueryError = ErrorType<RenderErrorResponseDTO>;
/**
* @summary Get resources
*/
export function useGetResources<
TData = Awaited<ReturnType<typeof getResources>>,
TError = ErrorType<RenderErrorResponseDTO>
>(options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof getResources>>,
TError,
TData
>;
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
const queryOptions = getGetResourcesQueryOptions(options);
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
queryKey: QueryKey;
};
query.queryKey = queryOptions.queryKey;
return query;
}
/**
* @summary Get resources
*/
export const invalidateGetResources = async (
queryClient: QueryClient,
options?: InvalidateOptions,
): Promise<QueryClient> => {
await queryClient.invalidateQueries(
{ queryKey: getGetResourcesQueryKey() },
options,
);
return queryClient;
};

View File

@@ -81,7 +81,7 @@ export interface AuthtypesGettableAuthDomainDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type string
*/
@@ -108,6 +108,33 @@ export interface AuthtypesGettableAuthDomainDTO {
updatedAt?: Date;
}
export interface AuthtypesGettableObjectsDTO {
resource: AuthtypesResourceDTO;
/**
* @type array
*/
selectors: string[];
}
/**
* @nullable
*/
export type AuthtypesGettableResourcesDTORelations = {
[key: string]: string[];
} | null;
export interface AuthtypesGettableResourcesDTO {
/**
* @type object
* @nullable true
*/
relations: AuthtypesGettableResourcesDTORelations;
/**
* @type array
*/
resources: AuthtypesResourceDTO[];
}
export interface AuthtypesGettableTokenDTO {
/**
* @type string
@@ -182,10 +209,6 @@ export interface AuthtypesGoogleConfigDTO {
serviceAccountJson?: string;
}
export interface AuthtypesNameDTO {
[key: string]: unknown;
}
export interface AuthtypesOIDCConfigDTO {
claimMapping?: AuthtypesAttributeMappingDTO;
/**
@@ -216,7 +239,10 @@ export interface AuthtypesOIDCConfigDTO {
export interface AuthtypesObjectDTO {
resource: AuthtypesResourceDTO;
selector: AuthtypesSelectorDTO;
/**
* @type string
*/
selector: string;
}
export interface AuthtypesOrgSessionContextDTO {
@@ -239,6 +265,19 @@ export interface AuthtypesPasswordAuthNSupportDTO {
provider?: string;
}
export interface AuthtypesPatchableObjectsDTO {
/**
* @type array
* @nullable true
*/
additions: AuthtypesGettableObjectsDTO[] | null;
/**
* @type array
* @nullable true
*/
deletions: AuthtypesGettableObjectsDTO[] | null;
}
export interface AuthtypesPostableAuthDomainDTO {
config?: AuthtypesAuthDomainConfigDTO;
/**
@@ -270,7 +309,10 @@ export interface AuthtypesPostableRotateTokenDTO {
}
export interface AuthtypesResourceDTO {
name: AuthtypesNameDTO;
/**
* @type string
*/
name: string;
/**
* @type string
*/
@@ -320,10 +362,6 @@ export interface AuthtypesSamlConfigDTO {
samlIdp?: string;
}
export interface AuthtypesSelectorDTO {
[key: string]: unknown;
}
export interface AuthtypesSessionContextDTO {
/**
* @type boolean
@@ -337,10 +375,6 @@ export interface AuthtypesSessionContextDTO {
}
export interface AuthtypesTransactionDTO {
/**
* @type string
*/
id?: string;
object: AuthtypesObjectDTO;
/**
* @type string
@@ -623,14 +657,14 @@ export interface GatewaytypesLimitMetricValueDTO {
export interface GatewaytypesLimitValueDTO {
/**
* @type integer
* @format int64
* @nullable true
*/
count?: number;
count?: number | null;
/**
* @type integer
* @format int64
* @nullable true
*/
size?: number;
size?: number | null;
}
export interface GatewaytypesPaginationDTO {
@@ -972,18 +1006,6 @@ export interface MetricsexplorertypesUpdateMetricMetadataRequestDTO {
unit: string;
}
export interface MetrictypesComparisonSpaceAggregationParamDTO {
/**
* @type string
*/
operator?: string;
/**
* @type number
* @format double
*/
threshold?: number;
}
export enum MetrictypesSpaceAggregationDTO {
sum = 'sum',
avg = 'avg',
@@ -995,7 +1017,6 @@ export enum MetrictypesSpaceAggregationDTO {
p90 = 'p90',
p95 = 'p95',
p99 = 'p99',
histogram_count = 'histogram_count',
}
export enum MetrictypesTemporalityDTO {
delta = 'delta',
@@ -1346,7 +1367,6 @@ export interface Querybuildertypesv5LogAggregationDTO {
}
export interface Querybuildertypesv5MetricAggregationDTO {
comparisonSpaceAggregationParam?: MetrictypesComparisonSpaceAggregationParamDTO;
/**
* @type string
*/
@@ -2006,39 +2026,6 @@ export interface RenderErrorResponseDTO {
status: string;
}
/**
* @nullable
*/
export type RoletypesGettableResourcesDTORelations = {
[key: string]: string[];
} | null;
export interface RoletypesGettableResourcesDTO {
/**
* @type object
* @nullable true
*/
relations: RoletypesGettableResourcesDTORelations;
/**
* @type array
* @nullable true
*/
resources: AuthtypesResourceDTO[] | null;
}
export interface RoletypesPatchableObjectsDTO {
/**
* @type array
* @nullable true
*/
additions: AuthtypesObjectDTO[] | null;
/**
* @type array
* @nullable true
*/
deletions: AuthtypesObjectDTO[] | null;
}
export interface RoletypesPatchableRoleDTO {
/**
* @type string
@@ -2070,7 +2057,7 @@ export interface RoletypesRoleDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type string
*/
@@ -2211,7 +2198,7 @@ export interface TypesGettableAPIKeyDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type integer
* @format int64
@@ -2264,7 +2251,7 @@ export interface TypesIdentifiableDTO {
/**
* @type string
*/
id?: string;
id: string;
}
export interface TypesInviteDTO {
@@ -2280,7 +2267,7 @@ export interface TypesInviteDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type string
*/
@@ -2325,7 +2312,7 @@ export interface TypesOrganizationDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type integer
* @minimum 0
@@ -2431,7 +2418,7 @@ export interface TypesResetPasswordTokenDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type string
*/
@@ -2455,7 +2442,7 @@ export interface TypesStorableAPIKeyDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type string
*/
@@ -2504,7 +2491,7 @@ export interface TypesUserDTO {
/**
* @type string
*/
id?: string;
id: string;
/**
* @type boolean
*/
@@ -2620,6 +2607,14 @@ export type AuthzCheck200 = {
status: string;
};
export type AuthzResources200 = {
data: AuthtypesGettableResourcesDTO;
/**
* @type string
*/
status: string;
};
export type ChangePasswordPathParameters = {
id: string;
};
@@ -3031,7 +3026,7 @@ export type GetObjects200 = {
/**
* @type array
*/
data: AuthtypesObjectDTO[];
data: AuthtypesGettableObjectsDTO[];
/**
* @type string
*/
@@ -3042,14 +3037,6 @@ export type PatchObjectsPathParameters = {
id: string;
relation: string;
};
export type GetResources200 = {
data: RoletypesGettableResourcesDTO;
/**
* @type string
*/
status: string;
};
export type ListUsers200 = {
/**
* @type array
@@ -3151,7 +3138,7 @@ export type GetIngestionKeys200 = {
status: string;
};
export type CreateIngestionKey200 = {
export type CreateIngestionKey201 = {
data: GatewaytypesGettableCreatedIngestionKeyDTO;
/**
* @type string

View File

@@ -1,4 +1,5 @@
import { UniversalYAxisUnit } from '../types';
import { YAxisCategoryNames } from '../constants';
import { UniversalYAxisUnit, YAxisCategory } from '../types';
import {
getUniversalNameFromMetricUnit,
mapMetricUnitToUniversalUnit,
@@ -41,29 +42,29 @@ describe('YAxisUnitSelector utils', () => {
describe('mergeCategories', () => {
it('merges categories correctly', () => {
const categories1 = [
const categories1: YAxisCategory[] = [
{
name: 'Data',
name: YAxisCategoryNames.Data,
units: [
{ name: 'bytes', id: UniversalYAxisUnit.BYTES },
{ name: 'kilobytes', id: UniversalYAxisUnit.KILOBYTES },
],
},
];
const categories2 = [
const categories2: YAxisCategory[] = [
{
name: 'Data',
name: YAxisCategoryNames.Data,
units: [{ name: 'bits', id: UniversalYAxisUnit.BITS }],
},
{
name: 'Time',
name: YAxisCategoryNames.Time,
units: [{ name: 'seconds', id: UniversalYAxisUnit.SECONDS }],
},
];
const mergedCategories = mergeCategories(categories1, categories2);
expect(mergedCategories).toEqual([
{
name: 'Data',
name: YAxisCategoryNames.Data,
units: [
{ name: 'bytes', id: UniversalYAxisUnit.BYTES },
{ name: 'kilobytes', id: UniversalYAxisUnit.KILOBYTES },
@@ -71,7 +72,7 @@ describe('YAxisUnitSelector utils', () => {
],
},
{
name: 'Time',
name: YAxisCategoryNames.Time,
units: [{ name: 'seconds', id: UniversalYAxisUnit.SECONDS }],
},
]);

View File

@@ -1,5 +1,36 @@
import { UnitFamilyConfig, UniversalYAxisUnit, YAxisUnit } from './types';
export enum YAxisCategoryNames {
Time = 'Time',
Data = 'Data',
DataRate = 'Data Rate',
Count = 'Count',
Operations = 'Operations',
Percentage = 'Percentage',
Boolean = 'Boolean',
None = 'None',
HashRate = 'Hash Rate',
Miscellaneous = 'Miscellaneous',
Acceleration = 'Acceleration',
Angular = 'Angular',
Area = 'Area',
Flops = 'FLOPs',
Concentration = 'Concentration',
Currency = 'Currency',
Datetime = 'Datetime',
PowerElectrical = 'Power/Electrical',
Flow = 'Flow',
Force = 'Force',
Mass = 'Mass',
Length = 'Length',
Pressure = 'Pressure',
Radiation = 'Radiation',
RotationSpeed = 'Rotation Speed',
Temperature = 'Temperature',
Velocity = 'Velocity',
Volume = 'Volume',
}
// Mapping of universal y-axis units to their AWS, UCUM, and OpenMetrics equivalents (if available)
export const UniversalYAxisUnitMappings: Partial<
Record<UniversalYAxisUnit, Set<YAxisUnit> | null>

View File

@@ -1,10 +1,11 @@
import { Y_AXIS_UNIT_NAMES } from './constants';
import { YAxisCategoryNames } from './constants';
import { UniversalYAxisUnit, YAxisCategory } from './types';
// Base categories for the universal y-axis units
export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
{
name: 'Time',
name: YAxisCategoryNames.Time,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.SECONDS],
@@ -37,7 +38,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Data',
name: YAxisCategoryNames.Data,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.BYTES],
@@ -154,7 +155,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Data Rate',
name: YAxisCategoryNames.DataRate,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.BYTES_SECOND],
@@ -295,7 +296,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Count',
name: YAxisCategoryNames.Count,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.COUNT],
@@ -312,7 +313,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Operations',
name: YAxisCategoryNames.Operations,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.OPS_SECOND],
@@ -353,7 +354,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Percentage',
name: YAxisCategoryNames.Percentage,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.PERCENT],
@@ -366,7 +367,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Boolean',
name: YAxisCategoryNames.Boolean,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.TRUE_FALSE],
@@ -382,7 +383,7 @@ export const BASE_Y_AXIS_CATEGORIES: YAxisCategory[] = [
export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
{
name: 'Time',
name: YAxisCategoryNames.Time,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.DURATION_MS],
@@ -419,7 +420,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Data Rate',
name: YAxisCategoryNames.DataRate,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.DATA_RATE_PACKETS_PER_SECOND],
@@ -428,7 +429,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Boolean',
name: YAxisCategoryNames.Boolean,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.ON_OFF],
@@ -437,7 +438,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'None',
name: YAxisCategoryNames.None,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.NONE],
@@ -446,7 +447,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Hash Rate',
name: YAxisCategoryNames.HashRate,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.HASH_RATE_HASHES_PER_SECOND],
@@ -479,7 +480,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Miscellaneous',
name: YAxisCategoryNames.Miscellaneous,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.MISC_STRING],
@@ -520,7 +521,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Acceleration',
name: YAxisCategoryNames.Acceleration,
units: [
{
name:
@@ -541,7 +542,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Angular',
name: YAxisCategoryNames.Angular,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.ANGULAR_DEGREE],
@@ -566,7 +567,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Area',
name: YAxisCategoryNames.Area,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.AREA_SQUARE_METERS],
@@ -583,7 +584,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'FLOPs',
name: YAxisCategoryNames.Flops,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.FLOPS_FLOPS],
@@ -620,7 +621,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Concentration',
name: YAxisCategoryNames.Concentration,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.CONCENTRATION_PPM],
@@ -677,7 +678,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Currency',
name: YAxisCategoryNames.Currency,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.CURRENCY_USD],
@@ -774,7 +775,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Datetime',
name: YAxisCategoryNames.Datetime,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.DATETIME_ISO],
@@ -811,7 +812,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Power/Electrical',
name: YAxisCategoryNames.PowerElectrical,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.POWER_WATT],
@@ -968,7 +969,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Flow',
name: YAxisCategoryNames.Flow,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.FLOW_GALLONS_PER_MINUTE],
@@ -1005,7 +1006,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Force',
name: YAxisCategoryNames.Force,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.FORCE_NEWTON_METERS],
@@ -1026,7 +1027,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Mass',
name: YAxisCategoryNames.Mass,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.MASS_MILLIGRAM],
@@ -1051,7 +1052,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Length',
name: YAxisCategoryNames.Length,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.LENGTH_MILLIMETER],
@@ -1080,7 +1081,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Pressure',
name: YAxisCategoryNames.Pressure,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.PRESSURE_MILLIBAR],
@@ -1117,7 +1118,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Radiation',
name: YAxisCategoryNames.Radiation,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.RADIATION_BECQUEREL],
@@ -1174,7 +1175,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Rotation Speed',
name: YAxisCategoryNames.RotationSpeed,
units: [
{
name:
@@ -1200,7 +1201,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Temperature',
name: YAxisCategoryNames.Temperature,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.TEMPERATURE_CELSIUS],
@@ -1217,7 +1218,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Velocity',
name: YAxisCategoryNames.Velocity,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.VELOCITY_METERS_PER_SECOND],
@@ -1238,7 +1239,7 @@ export const ADDITIONAL_Y_AXIS_CATEGORIES: YAxisCategory[] = [
],
},
{
name: 'Volume',
name: YAxisCategoryNames.Volume,
units: [
{
name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.VOLUME_MILLILITER],

View File

@@ -1,3 +1,5 @@
import { YAxisCategoryNames } from './constants';
export interface YAxisUnitSelectorProps {
value: string | undefined;
onChange: (value: UniversalYAxisUnit) => void;
@@ -669,7 +671,7 @@ export interface UnitFamilyConfig {
}
export interface YAxisCategory {
name: string;
name: YAxisCategoryNames;
units: {
name: string;
id: UniversalYAxisUnit;

View File

@@ -18,8 +18,8 @@ jest.mock('lib/query/createTableColumnsFromQuery', () => ({
jest.mock('container/NewWidget/utils', () => ({
unitOptions: jest.fn(() => [
{ value: 'none', label: 'None' },
{ value: 'percent', label: 'Percent' },
{ value: 'ms', label: 'Milliseconds' },
{ value: '%', label: 'Percent (0 - 100)' },
{ value: 'ms', label: 'Milliseconds (ms)' },
]),
}));
@@ -39,7 +39,7 @@ const defaultProps = {
],
thresholdTableOptions: 'cpu_usage',
columnUnits: { cpu_usage: 'percent', memory_usage: 'bytes' },
yAxisUnit: 'percent',
yAxisUnit: '%',
moveThreshold: jest.fn(),
};

View File

@@ -1,3 +1,10 @@
import {
UniversalUnitToGrafanaUnit,
YAxisCategoryNames,
} from 'components/YAxisUnitSelector/constants';
import { YAxisSource } from 'components/YAxisUnitSelector/types';
import { getYAxisCategories } from 'components/YAxisUnitSelector/utils';
import { convertValue } from 'lib/getConvertedValue';
import { flattenDeep } from 'lodash-es';
import {
@@ -439,130 +446,28 @@ export const flattenedCategories = flattenDeep(
dataTypeCategories.map((category) => category.formats),
);
type ConversionFactors = {
[key: string]: {
[key: string]: number | null;
};
};
// Function to get the category name for a given unit ID (Grafana or universal)
export const getCategoryName = (unitId: string): YAxisCategoryNames | null => {
const categories = getYAxisCategories(YAxisSource.DASHBOARDS);
// Object containing conversion factors for various categories and formats
const conversionFactors: ConversionFactors = {
[CategoryNames.Time]: {
[TimeFormats.Hertz]: 1,
[TimeFormats.Nanoseconds]: 1e-9,
[TimeFormats.Microseconds]: 1e-6,
[TimeFormats.Milliseconds]: 1e-3,
[TimeFormats.Seconds]: 1,
[TimeFormats.Minutes]: 60,
[TimeFormats.Hours]: 3600,
[TimeFormats.Days]: 86400,
[TimeFormats.DurationMs]: 1e-3,
[TimeFormats.DurationS]: 1,
[TimeFormats.DurationHms]: null, // Requires special handling
[TimeFormats.DurationDhms]: null, // Requires special handling
[TimeFormats.Timeticks]: null, // Requires special handling
[TimeFormats.ClockMs]: 1e-3,
[TimeFormats.ClockS]: 1,
},
[CategoryNames.Throughput]: {
[ThroughputFormats.CountsPerSec]: 1,
[ThroughputFormats.OpsPerSec]: 1,
[ThroughputFormats.RequestsPerSec]: 1,
[ThroughputFormats.ReadsPerSec]: 1,
[ThroughputFormats.WritesPerSec]: 1,
[ThroughputFormats.IOOpsPerSec]: 1,
[ThroughputFormats.CountsPerMin]: 1 / 60,
[ThroughputFormats.OpsPerMin]: 1 / 60,
[ThroughputFormats.ReadsPerMin]: 1 / 60,
[ThroughputFormats.WritesPerMin]: 1 / 60,
},
[CategoryNames.Data]: {
[DataFormats.BytesIEC]: 1,
[DataFormats.BytesSI]: 1,
[DataFormats.BitsIEC]: 0.125,
[DataFormats.BitsSI]: 0.125,
[DataFormats.KibiBytes]: 1024,
[DataFormats.KiloBytes]: 1000,
[DataFormats.MebiBytes]: 1048576,
[DataFormats.MegaBytes]: 1000000,
[DataFormats.GibiBytes]: 1073741824,
[DataFormats.GigaBytes]: 1000000000,
[DataFormats.TebiBytes]: 1099511627776,
[DataFormats.TeraBytes]: 1000000000000,
[DataFormats.PebiBytes]: 1125899906842624,
[DataFormats.PetaBytes]: 1000000000000000,
},
[CategoryNames.DataRate]: {
[DataRateFormats.PacketsPerSec]: null, // Cannot convert directly to other data rates
[DataRateFormats.BytesPerSecIEC]: 1,
[DataRateFormats.BytesPerSecSI]: 1,
[DataRateFormats.BitsPerSecIEC]: 0.125,
[DataRateFormats.BitsPerSecSI]: 0.125,
[DataRateFormats.KibiBytesPerSec]: 1024,
[DataRateFormats.KibiBitsPerSec]: 128,
[DataRateFormats.KiloBytesPerSec]: 1000,
[DataRateFormats.KiloBitsPerSec]: 125,
[DataRateFormats.MebiBytesPerSec]: 1048576,
[DataRateFormats.MebiBitsPerSec]: 131072,
[DataRateFormats.MegaBytesPerSec]: 1000000,
[DataRateFormats.MegaBitsPerSec]: 125000,
[DataRateFormats.GibiBytesPerSec]: 1073741824,
[DataRateFormats.GibiBitsPerSec]: 134217728,
[DataRateFormats.GigaBytesPerSec]: 1000000000,
[DataRateFormats.GigaBitsPerSec]: 125000000,
[DataRateFormats.TebiBytesPerSec]: 1099511627776,
[DataRateFormats.TebiBitsPerSec]: 137438953472,
[DataRateFormats.TeraBytesPerSec]: 1000000000000,
[DataRateFormats.TeraBitsPerSec]: 125000000000,
[DataRateFormats.PebiBytesPerSec]: 1125899906842624,
[DataRateFormats.PebiBitsPerSec]: 140737488355328,
[DataRateFormats.PetaBytesPerSec]: 1000000000000000,
[DataRateFormats.PetaBitsPerSec]: 125000000000000,
},
[CategoryNames.Miscellaneous]: {
[MiscellaneousFormats.None]: null,
[MiscellaneousFormats.String]: null,
[MiscellaneousFormats.Short]: null,
[MiscellaneousFormats.Percent]: 1,
[MiscellaneousFormats.PercentUnit]: 100,
[MiscellaneousFormats.Humidity]: 1,
[MiscellaneousFormats.Decibel]: null,
[MiscellaneousFormats.Hexadecimal0x]: null,
[MiscellaneousFormats.Hexadecimal]: null,
[MiscellaneousFormats.ScientificNotation]: null,
[MiscellaneousFormats.LocaleFormat]: null,
[MiscellaneousFormats.Pixels]: null,
},
[CategoryNames.Boolean]: {
[BooleanFormats.TRUE_FALSE]: null, // Not convertible
[BooleanFormats.YES_NO]: null, // Not convertible
[BooleanFormats.ON_OFF]: null, // Not convertible
},
};
const foundCategory = categories.find((category) =>
category.units.some((unit) => {
// Units in Y-axis categories use universal unit IDs.
// Thresholds / column units often use Grafana-style IDs.
// Treat a unit as matching if either:
// - it is already the universal ID, or
// - it matches the mapped Grafana ID for that universal unit.
if (unit.id === unitId) {
return true;
}
// Function to get the conversion factor between two units in a specific category
function getConversionFactor(
fromUnit: string,
toUnit: string,
category: CategoryNames,
): number | null {
// Retrieves the conversion factors for the specified category
const categoryFactors = conversionFactors[category];
if (!categoryFactors) {
return null; // Returns null if the category does not exist
}
const fromFactor = categoryFactors[fromUnit];
const toFactor = categoryFactors[toUnit];
if (
fromFactor === undefined ||
toFactor === undefined ||
fromFactor === null ||
toFactor === null
) {
return null; // Returns null if either unit does not exist or is not convertible
}
return fromFactor / toFactor; // Returns the conversion factor ratio
}
const grafanaId = UniversalUnitToGrafanaUnit[unit.id];
return grafanaId === unitId;
}),
);
return foundCategory ? foundCategory.name : null;
};
// Function to convert a value from one unit to another
export function convertUnit(
@@ -570,44 +475,19 @@ export function convertUnit(
fromUnitId?: string,
toUnitId?: string,
): number | null {
let fromUnit: string | undefined;
let toUnit: string | undefined;
// Finds the category that contains the specified units and extracts fromUnit and toUnit using array methods
const category = dataTypeCategories.find((category) =>
category.formats.some((format) => {
if (format.id === fromUnitId) {
fromUnit = format.id;
}
if (format.id === toUnitId) {
toUnit = format.id;
}
return fromUnit && toUnit; // Break out early if both units are found
}),
);
if (!category || !fromUnit || !toUnit) {
if (!fromUnitId || !toUnitId) {
return null;
} // Return null if category or units are not found
}
// Gets the conversion factor for the specified units
const conversionFactor = getConversionFactor(
fromUnit,
toUnit,
category.name as any,
);
if (conversionFactor === null) {
const fromCategory = getCategoryName(fromUnitId);
const toCategory = getCategoryName(toUnitId);
// If either unit is unknown or the categories don't match, the conversion is invalid
if (!fromCategory || !toCategory || fromCategory !== toCategory) {
return null;
} // Return null if conversion is not possible
}
return value * conversionFactor;
// Delegate the actual numeric conversion (or identity) to the shared helper,
// which understands both Grafana-style and universal unit IDs.
return convertValue(value, fromUnitId, toUnitId);
}
// Function to get the category name for a given unit ID
export const getCategoryName = (unitId: string): CategoryNames | null => {
// Finds the category that contains the specified unit ID
const foundCategory = dataTypeCategories.find((category) =>
category.formats.some((format) => format.id === unitId),
);
return foundCategory ? (foundCategory.name as CategoryNames) : null;
};

View File

@@ -2,6 +2,9 @@ import { Layout } from 'react-grid-layout';
import { DefaultOptionType } from 'antd/es/select';
import { omitIdFromQuery } from 'components/ExplorerCard/utils';
import { PrecisionOptionsEnum } from 'components/Graph/types';
import { YAxisCategoryNames } from 'components/YAxisUnitSelector/constants';
import { YAxisSource } from 'components/YAxisUnitSelector/types';
import { getYAxisCategories } from 'components/YAxisUnitSelector/utils';
import {
initialQueryBuilderFormValuesMap,
PANEL_TYPES,
@@ -21,11 +24,7 @@ import { IBuilderQuery, Query } from 'types/api/queryBuilder/queryBuilderData';
import { EQueryType } from 'types/common/dashboard';
import { DataSource } from 'types/common/queryBuilder';
import {
dataTypeCategories,
getCategoryName,
} from './RightContainer/dataFormatCategories';
import { CategoryNames } from './RightContainer/types';
import { getCategoryName } from './RightContainer/dataFormatCategories';
export const getIsQueryModified = (
currentQuery: Query,
@@ -606,14 +605,21 @@ export const PANEL_TYPE_TO_QUERY_TYPES: Record<PANEL_TYPES, EQueryType[]> = {
* the label and value for each format.
*/
export const getCategorySelectOptionByName = (
name?: CategoryNames | string,
): DefaultOptionType[] =>
dataTypeCategories
.find((category) => category.name === name)
?.formats.map((format) => ({
label: format.name,
value: format.id,
})) || [];
name?: YAxisCategoryNames,
): DefaultOptionType[] => {
const categories = getYAxisCategories(YAxisSource.DASHBOARDS);
if (!categories.length) {
return [];
}
return (
categories
.find((category) => category.name === name)
?.units.map((unit) => ({
label: unit.name,
value: unit.id,
})) || []
);
};
/**
* Generates unit options based on the provided column unit.

View File

@@ -116,7 +116,7 @@ describe('SSOEnforcementToggle', () => {
render(
<SSOEnforcementToggle
isDefaultChecked={true}
record={{ ...mockGoogleAuthDomain, id: undefined }}
record={{ ...mockGoogleAuthDomain, id: '' }}
/>,
);

View File

@@ -1,10 +1,13 @@
import { CategoryNames } from 'container/NewWidget/RightContainer/types';
import { YAxisCategoryNames } from 'components/YAxisUnitSelector/constants';
export const categoryToSupport = [
CategoryNames.Data,
CategoryNames.DataRate,
CategoryNames.Time,
CategoryNames.Throughput,
CategoryNames.Miscellaneous,
CategoryNames.Boolean,
export const categoryToSupport: YAxisCategoryNames[] = [
YAxisCategoryNames.None,
YAxisCategoryNames.Data,
YAxisCategoryNames.DataRate,
YAxisCategoryNames.Time,
YAxisCategoryNames.Count,
YAxisCategoryNames.Operations,
YAxisCategoryNames.Percentage,
YAxisCategoryNames.Miscellaneous,
YAxisCategoryNames.Boolean,
];

View File

@@ -26,5 +26,22 @@ func (provider *provider) addAuthzRoutes(router *mux.Router) error {
return err
}
if err := router.Handle("/api/v1/authz/resources", handler.New(provider.authZ.OpenAccess(provider.authzHandler.GetResources), handler.OpenAPIDef{
ID: "AuthzResources",
Tags: []string{"authz"},
Summary: "Get resources",
Description: "Gets all the available resources",
Request: nil,
RequestContentType: "",
Response: new(authtypes.GettableResources),
ResponseContentType: "application/json",
SuccessStatusCode: http.StatusOK,
ErrorStatusCodes: []int{},
Deprecated: false,
SecuritySchemes: nil,
})).Methods(http.MethodGet).GetError(); err != nil {
return err
}
return nil
}

View File

@@ -55,7 +55,7 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
RequestContentType: "application/json",
Response: new(gatewaytypes.GettableCreatedIngestionKey),
ResponseContentType: "application/json",
SuccessStatusCode: http.StatusOK,
SuccessStatusCode: http.StatusCreated,
ErrorStatusCodes: []int{},
Deprecated: false,
SecuritySchemes: newSecuritySchemes(types.RoleAdmin),

View File

@@ -45,23 +45,6 @@ func (provider *provider) addRoleRoutes(router *mux.Router) error {
return err
}
if err := router.Handle("/api/v1/roles/resources", handler.New(provider.authZ.AdminAccess(provider.authzHandler.GetResources), handler.OpenAPIDef{
ID: "GetResources",
Tags: []string{"role"},
Summary: "Get resources",
Description: "Gets all the available resources for role assignment",
Request: nil,
RequestContentType: "",
Response: new(roletypes.GettableResources),
ResponseContentType: "application/json",
SuccessStatusCode: http.StatusOK,
ErrorStatusCodes: []int{},
Deprecated: false,
SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
})).Methods(http.MethodGet).GetError(); err != nil {
return err
}
if err := router.Handle("/api/v1/roles/{id}", handler.New(provider.authZ.AdminAccess(provider.authzHandler.Get), handler.OpenAPIDef{
ID: "GetRole",
Tags: []string{"role"},
@@ -86,7 +69,7 @@ func (provider *provider) addRoleRoutes(router *mux.Router) error {
Description: "Gets all objects connected to the specified role via a given relation type",
Request: nil,
RequestContentType: "",
Response: make([]*authtypes.Object, 0),
Response: make([]*authtypes.GettableObjects, 0),
ResponseContentType: "application/json",
SuccessStatusCode: http.StatusOK,
ErrorStatusCodes: []int{http.StatusNotFound, http.StatusNotImplemented, http.StatusUnavailableForLegalReasons},
@@ -118,7 +101,7 @@ func (provider *provider) addRoleRoutes(router *mux.Router) error {
Tags: []string{"role"},
Summary: "Patch objects for a role by relation",
Description: "Patches the objects connected to the specified role via a given relation type",
Request: new(roletypes.PatchableObjects),
Request: new(authtypes.PatchableObjects),
RequestContentType: "",
Response: nil,
ResponseContentType: "application/json",

View File

@@ -190,7 +190,7 @@ func (provider *provider) GetOrCreate(_ context.Context, _ valuer.UUID, _ *rolet
}
func (provider *provider) GetResources(_ context.Context) []*authtypes.Resource {
return nil
return []*authtypes.Resource{}
}
func (provider *provider) GetObjects(ctx context.Context, orgID valuer.UUID, id valuer.UUID, relation authtypes.Relation) ([]*authtypes.Object, error) {

View File

@@ -110,13 +110,13 @@ func (handler *handler) GetObjects(rw http.ResponseWriter, r *http.Request) {
return
}
render.Success(rw, http.StatusOK, objects)
render.Success(rw, http.StatusOK, authtypes.NewGettableObjects(objects))
}
func (handler *handler) GetResources(rw http.ResponseWriter, r *http.Request) {
resources := handler.authz.GetResources(r.Context())
render.Success(rw, http.StatusOK, roletypes.NewGettableResources(resources))
render.Success(rw, http.StatusOK, authtypes.NewGettableResources(resources))
}
func (handler *handler) List(rw http.ResponseWriter, r *http.Request) {
@@ -197,25 +197,30 @@ func (handler *handler) PatchObjects(rw http.ResponseWriter, r *http.Request) {
return
}
req := new(roletypes.PatchableObjects)
if err := binding.JSON.BindBody(r.Body, req); err != nil {
render.Error(rw, err)
return
}
role, err := handler.authz.Get(ctx, valuer.MustNewUUID(claims.OrgID), id)
if err != nil {
render.Error(rw, err)
return
}
patchableObjects, err := role.NewPatchableObjects(req.Additions, req.Deletions, relation)
if err := role.ErrIfManaged(); err != nil {
render.Error(rw, err)
return
}
req := new(authtypes.PatchableObjects)
if err := binding.JSON.BindBody(r.Body, req); err != nil {
render.Error(rw, err)
return
}
additions, deletions, err := authtypes.NewPatchableObjects(req.Additions, req.Deletions, relation)
if err != nil {
render.Error(rw, err)
return
}
err = handler.authz.PatchObjects(ctx, valuer.MustNewUUID(claims.OrgID), role.Name, relation, patchableObjects.Additions, patchableObjects.Deletions)
err = handler.authz.PatchObjects(ctx, valuer.MustNewUUID(claims.OrgID), role.Name, relation, additions, deletions)
if err != nil {
render.Error(rw, err)
return

View File

@@ -122,7 +122,7 @@ func (handler *handler) CreateIngestionKey(rw http.ResponseWriter, r *http.Reque
return
}
render.Success(rw, http.StatusOK, response)
render.Success(rw, http.StatusCreated, response)
}
func (handler *handler) UpdateIngestionKey(rw http.ResponseWriter, r *http.Request) {

View File

@@ -80,16 +80,11 @@ func (q *builderQuery[T]) Fingerprint() string {
case qbtypes.LogAggregation:
aggParts = append(aggParts, a.Expression)
case qbtypes.MetricAggregation:
var spaceAggParamStr string
if a.ComparisonSpaceAggregationParam != nil {
spaceAggParamStr = a.ComparisonSpaceAggregationParam.StringValue()
}
aggParts = append(aggParts, fmt.Sprintf("%s:%s:%s:%s:%s",
aggParts = append(aggParts, fmt.Sprintf("%s:%s:%s:%s",
a.MetricName,
a.Temporality.StringValue(),
a.TimeAggregation.StringValue(),
a.SpaceAggregation.StringValue(),
spaceAggParamStr,
))
}
}

View File

@@ -123,8 +123,7 @@ func (b *MetricQueryStatementBuilder) buildPipelineStatement(
origTimeAgg := query.Aggregations[0].TimeAggregation
origGroupBy := slices.Clone(query.GroupBy)
if (query.Aggregations[0].SpaceAggregation.IsPercentile() ||
query.Aggregations[0].SpaceAggregation == metrictypes.SpaceAggregationHistogramCount) &&
if query.Aggregations[0].SpaceAggregation.IsPercentile() &&
query.Aggregations[0].Type != metrictypes.ExpHistogramType {
// add le in the group by if doesn't exist
leExists := false
@@ -155,11 +154,7 @@ func (b *MetricQueryStatementBuilder) buildPipelineStatement(
}
// make the time aggregation rate and space aggregation sum
if query.Aggregations[0].SpaceAggregation.IsPercentile() {
query.Aggregations[0].TimeAggregation = metrictypes.TimeAggregationRate
} else {
query.Aggregations[0].TimeAggregation = metrictypes.TimeAggregationIncrease
}
query.Aggregations[0].TimeAggregation = metrictypes.TimeAggregationRate
query.Aggregations[0].SpaceAggregation = metrictypes.SpaceAggregationSum
}
@@ -529,7 +524,7 @@ func (b *MetricQueryStatementBuilder) buildSpatialAggregationCTE(
return "", nil, errors.Newf(
errors.TypeInvalidInput,
errors.CodeInvalidInput,
"invalid space aggregation, should be one of the following: [`sum`, `avg`, `min`, `max`, `count`, `p50`, `p75`, `p90`, `p95`, `p99`, `histogram_count`]",
"invalid space aggregation, should be one of the following: [`sum`, `avg`, `min`, `max`, `count`, `p50`, `p75`, `p90`, `p95`, `p99`]",
)
}
sb := sqlbuilder.NewSelectBuilder()
@@ -582,29 +577,6 @@ func (b *MetricQueryStatementBuilder) BuildFinalSelect(
sb.From("__spatial_aggregation_cte")
sb.GroupBy(querybuilder.GroupByKeys(query.GroupBy)...)
sb.GroupBy("ts")
if query.Having != nil && query.Having.Expression != "" {
rewriter := querybuilder.NewHavingExpressionRewriter()
rewrittenExpr := rewriter.RewriteForMetrics(query.Having.Expression, query.Aggregations)
sb.Having(rewrittenExpr)
}
} else if query.Aggregations[0].SpaceAggregation == metrictypes.SpaceAggregationHistogramCount {
sb.Select("ts")
for _, g := range query.GroupBy {
sb.SelectMore(fmt.Sprintf("`%s`", g.TelemetryFieldKey.Name))
}
aggQuery, err := AggregationQueryForHistogramCount(query.Aggregations[0].ComparisonSpaceAggregationParam)
if err != nil {
return nil, err
}
sb.SelectMore(aggQuery)
sb.From("__spatial_aggregation_cte")
sb.GroupBy(querybuilder.GroupByKeys(query.GroupBy)...)
sb.GroupBy("ts")
if query.Having != nil && query.Having.Expression != "" {
rewriter := querybuilder.NewHavingExpressionRewriter()
rewrittenExpr := rewriter.RewriteForMetrics(query.Having.Expression, query.Aggregations)

View File

@@ -1,7 +1,6 @@
package telemetrymetrics
import (
"fmt"
"time"
"github.com/SigNoz/signoz/pkg/errors"
@@ -309,20 +308,3 @@ func AggregationColumnForSamplesTable(
}
return aggregationColumn, nil
}
func AggregationQueryForHistogramCount(param *metrictypes.ComparisonSpaceAggregationParam) (string, error) {
if param == nil {
return "", errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "no aggregation param provided for histogram count")
}
histogramCountThreshold := param.Threshold
switch param.Operater {
case "<=":
return fmt.Sprintf("argMaxIf(value, toFloat64(le), toFloat64(le) <= %f) + (argMinIf(value, toFloat64(le), toFloat64(le) > %f) - argMaxIf(value, toFloat64(le), toFloat64(le) <= %f)) * (%f - maxIf(toFloat64(le), toFloat64(le) <= %f)) / (minIf(toFloat64(le), toFloat64(le) > %f) - maxIf(toFloat64(le), toFloat64(le) <= %f)) AS value", histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold), nil
case ">":
return fmt.Sprintf("argMax(value, toFloat64(le)) - (argMaxIf(value, toFloat64(le), toFloat64(le) <= %f) + (argMinIf(value, toFloat64(le), toFloat64(le) > %f) - argMaxIf(value, toFloat64(le), toFloat64(le) <= %f)) * (%f - maxIf(toFloat64(le), toFloat64(le) <= %f)) / (minIf(toFloat64(le), toFloat64(le) > %f) - maxIf(toFloat64(le), toFloat64(le) <= %f))) AS value", histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold, histogramCountThreshold), nil
default:
return "", errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "invalid space aggregation operator, should be one of the following: [`<=`, `>`]")
}
}

View File

@@ -1,6 +1,7 @@
package authtypes
import (
"encoding"
"encoding/json"
"regexp"
@@ -10,8 +11,10 @@ import (
var (
nameRegex = regexp.MustCompile("^[a-z-]{1,50}$")
_ json.Marshaler = new(Name)
_ json.Unmarshaler = new(Name)
_ json.Marshaler = new(Name)
_ json.Unmarshaler = new(Name)
_ encoding.TextMarshaler = new(Name)
_ encoding.TextUnmarshaler = new(Name)
)
type Name struct {
@@ -58,3 +61,16 @@ func (name *Name) UnmarshalJSON(data []byte) error {
*name = shadow
return nil
}
func (name Name) MarshalText() ([]byte, error) {
return []byte(name.val), nil
}
func (name *Name) UnmarshalText(text []byte) error {
shadow, err := NewName(string(text))
if err != nil {
return err
}
*name = shadow
return nil
}

View File

@@ -0,0 +1,177 @@
package authtypes
import (
"encoding/json"
"slices"
"strings"
"github.com/SigNoz/signoz/pkg/errors"
)
type Resource struct {
Name Name `json:"name" required:"true"`
Type Type `json:"type" required:"true"`
}
type GettableResources struct {
Resources []*Resource `json:"resources" required:"true" nullable:"false"`
Relations map[Relation][]Type `json:"relations" required:"true"`
}
type Object struct {
Resource Resource `json:"resource" required:"true"`
Selector Selector `json:"selector" required:"true"`
}
type GettableObjects struct {
Resource Resource `json:"resource" required:"true"`
Selectors []Selector `json:"selectors" required:"true" nullable:"false"`
}
type PatchableObjects struct {
Additions []*GettableObjects `json:"additions" required:"true" nullable:"true"`
Deletions []*GettableObjects `json:"deletions" required:"true" nullable:"true"`
}
func NewObject(resource Resource, selector Selector) (*Object, error) {
err := IsValidSelector(resource.Type, selector.String())
if err != nil {
return nil, err
}
return &Object{Resource: resource, Selector: selector}, nil
}
func NewObjectsFromGettableObjects(patchableObjects []*GettableObjects) ([]*Object, error) {
objects := make([]*Object, 0)
for _, patchObject := range patchableObjects {
for _, selector := range patchObject.Selectors {
object, err := NewObject(patchObject.Resource, selector)
if err != nil {
return nil, err
}
objects = append(objects, object)
}
}
return objects, nil
}
func NewPatchableObjects(additions []*GettableObjects, deletions []*GettableObjects, relation Relation) ([]*Object, []*Object, error) {
if len(additions) == 0 && len(deletions) == 0 {
return nil, nil, errors.New(errors.TypeInvalidInput, ErrCodeInvalidPatchObject, "empty object patch request received, at least one of additions or deletions must be present")
}
for _, object := range additions {
if !slices.Contains(TypeableRelations[object.Resource.Type], relation) {
return nil, nil, errors.Newf(errors.TypeInvalidInput, ErrCodeAuthZInvalidRelation, "relation %s is invalid for type %s", relation.StringValue(), object.Resource.Type.StringValue())
}
}
for _, object := range deletions {
if !slices.Contains(TypeableRelations[object.Resource.Type], relation) {
return nil, nil, errors.Newf(errors.TypeInvalidInput, ErrCodeAuthZInvalidRelation, "relation %s is invalid for type %s", relation.StringValue(), object.Resource.Type.StringValue())
}
}
additionObjects, err := NewObjectsFromGettableObjects(additions)
if err != nil {
return nil, nil, err
}
deletionsObjects, err := NewObjectsFromGettableObjects(deletions)
if err != nil {
return nil, nil, err
}
return additionObjects, deletionsObjects, nil
}
func NewGettableResources(resources []*Resource) *GettableResources {
return &GettableResources{
Resources: resources,
Relations: RelationsTypeable,
}
}
func NewGettableObjects(objects []*Object) []*GettableObjects {
grouped := make(map[Resource][]Selector)
for _, obj := range objects {
key := obj.Resource
if _, ok := grouped[key]; !ok {
grouped[key] = make([]Selector, 0)
}
grouped[key] = append(grouped[key], obj.Selector)
}
gettableObjects := make([]*GettableObjects, 0, len(grouped))
for resource, selectors := range grouped {
gettableObjects = append(gettableObjects, &GettableObjects{
Resource: resource,
Selectors: selectors,
})
}
return gettableObjects
}
func MustNewObject(resource Resource, selector Selector) *Object {
object, err := NewObject(resource, selector)
if err != nil {
panic(err)
}
return object
}
func MustNewObjectFromString(input string) *Object {
parts := strings.Split(input, "/")
if len(parts) != 4 {
panic(errors.Newf(errors.TypeInternal, errors.CodeInternal, "invalid input format: %s", input))
}
typeParts := strings.Split(parts[0], ":")
if len(typeParts) != 2 {
panic(errors.Newf(errors.TypeInternal, errors.CodeInternal, "invalid type format: %s", parts[0]))
}
resource := Resource{
Type: MustNewType(typeParts[0]),
Name: MustNewName(parts[2]),
}
selector := MustNewSelector(resource.Type, parts[3])
return &Object{Resource: resource, Selector: selector}
}
func MustNewObjectsFromStringSlice(input []string) []*Object {
objects := make([]*Object, 0, len(input))
for _, str := range input {
objects = append(objects, MustNewObjectFromString(str))
}
return objects
}
func (object *Object) UnmarshalJSON(data []byte) error {
var shadow = struct {
Resource Resource
Selector Selector
}{}
err := json.Unmarshal(data, &shadow)
if err != nil {
return err
}
obj, err := NewObject(shadow.Resource, shadow.Selector)
if err != nil {
return err
}
*object = *obj
return nil
}

View File

@@ -7,6 +7,7 @@ import (
var (
ErrCodeAuthZInvalidRelation = errors.MustNewCode("authz_invalid_relation")
ErrCodeInvalidPatchObject = errors.MustNewCode("authz_invalid_patch_objects")
)
var (
@@ -26,6 +27,14 @@ var TypeableRelations = map[Type][]Relation{
TypeMetaResources: {RelationCreate, RelationList},
}
var RelationsTypeable = map[Relation][]Type{
RelationCreate: {TypeMetaResources},
RelationRead: {TypeUser, TypeRole, TypeOrganization, TypeMetaResource},
RelationList: {TypeMetaResources},
RelationUpdate: {TypeUser, TypeRole, TypeOrganization, TypeMetaResource},
RelationDelete: {TypeUser, TypeRole, TypeOrganization, TypeMetaResource},
}
type Relation struct{ valuer.String }
func NewRelation(relation string) (Relation, error) {

View File

@@ -1,6 +1,7 @@
package authtypes
import (
"encoding"
"encoding/json"
"net/http"
"regexp"
@@ -15,8 +16,10 @@ var (
)
var (
_ json.Marshaler = new(Selector)
_ json.Unmarshaler = new(Selector)
_ json.Marshaler = new(Selector)
_ json.Unmarshaler = new(Selector)
_ encoding.TextMarshaler = new(Selector)
_ encoding.TextUnmarshaler = new(Selector)
)
var (
@@ -79,6 +82,15 @@ func (typed *Selector) UnmarshalJSON(data []byte) error {
return nil
}
func (selector Selector) MarshalText() ([]byte, error) {
return []byte(selector.val), nil
}
func (selector *Selector) UnmarshalText(text []byte) error {
*selector = Selector{val: string(text)}
return nil
}
func IsValidSelector(typed Type, selector string) error {
switch typed {
case TypeUser:

View File

@@ -3,24 +3,13 @@ package authtypes
import (
"encoding/json"
"slices"
"strings"
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/valuer"
)
type Resource struct {
Name Name `json:"name" required:"true"`
Type Type `json:"type" required:"true"`
}
type Object struct {
Resource Resource `json:"resource" required:"true"`
Selector Selector `json:"selector" required:"true"`
}
type Transaction struct {
ID valuer.UUID `json:"id"`
ID valuer.UUID `json:"-"`
Relation Relation `json:"relation" required:"true"`
Object Object `json:"object" required:"true"`
}
@@ -31,53 +20,6 @@ type GettableTransaction struct {
Authorized bool `json:"authorized" required:"true"`
}
func NewObject(resource Resource, selector Selector) (*Object, error) {
err := IsValidSelector(resource.Type, selector.val)
if err != nil {
return nil, err
}
return &Object{Resource: resource, Selector: selector}, nil
}
func MustNewObject(resource Resource, selector Selector) *Object {
object, err := NewObject(resource, selector)
if err != nil {
panic(err)
}
return object
}
func MustNewObjectFromString(input string) *Object {
parts := strings.Split(input, "/")
if len(parts) != 4 {
panic(errors.Newf(errors.TypeInternal, errors.CodeInternal, "invalid input format: %s", input))
}
typeParts := strings.Split(parts[0], ":")
if len(typeParts) != 2 {
panic(errors.Newf(errors.TypeInternal, errors.CodeInternal, "invalid type format: %s", parts[0]))
}
resource := Resource{
Type: MustNewType(typeParts[0]),
Name: MustNewName(parts[2]),
}
selector := MustNewSelector(resource.Type, parts[3])
return &Object{Resource: resource, Selector: selector}
}
func MustNewObjectsFromStringSlice(input []string) []*Object {
objects := make([]*Object, 0, len(input))
for _, str := range input {
objects = append(objects, MustNewObjectFromString(str))
}
return objects
}
func NewTransaction(relation Relation, object Object) (*Transaction, error) {
if !slices.Contains(TypeableRelations[object.Resource.Type], relation) {
return nil, errors.Newf(errors.TypeInvalidInput, ErrCodeAuthZInvalidRelation, "invalid relation %s for type %s", relation.StringValue(), object.Resource.Type.StringValue())
@@ -100,26 +42,6 @@ func NewGettableTransaction(transactions []*Transaction, results map[string]*Tup
return gettableTransactions
}
func (object *Object) UnmarshalJSON(data []byte) error {
var shadow = struct {
Resource Resource
Selector Selector
}{}
err := json.Unmarshal(data, &shadow)
if err != nil {
return err
}
obj, err := NewObject(shadow.Resource, shadow.Selector)
if err != nil {
return err
}
*object = *obj
return nil
}
func (transaction *Transaction) UnmarshalJSON(data []byte) error {
var shadow = struct {
Relation Relation

View File

@@ -33,8 +33,8 @@ type LimitConfig struct {
}
type LimitValue struct {
Size int64 `json:"size"`
Count int64 `json:"count"`
Size *int64 `json:"size,omitempty"`
Count *int64 `json:"count,omitempty"`
}
type LimitMetric struct {

View File

@@ -5,5 +5,5 @@ import (
)
type Identifiable struct {
ID valuer.UUID `json:"id" bun:"id,pk,type:text"`
ID valuer.UUID `json:"id" bun:"id,pk,type:text" required:"true"`
}

View File

@@ -2,7 +2,6 @@ package metrictypes
import (
"database/sql/driver"
"fmt"
"strings"
"github.com/SigNoz/signoz/pkg/errors"
@@ -190,18 +189,17 @@ type SpaceAggregation struct {
}
var (
SpaceAggregationUnspecified = SpaceAggregation{valuer.NewString("")}
SpaceAggregationSum = SpaceAggregation{valuer.NewString("sum")}
SpaceAggregationAvg = SpaceAggregation{valuer.NewString("avg")}
SpaceAggregationMin = SpaceAggregation{valuer.NewString("min")}
SpaceAggregationMax = SpaceAggregation{valuer.NewString("max")}
SpaceAggregationCount = SpaceAggregation{valuer.NewString("count")}
SpaceAggregationPercentile50 = SpaceAggregation{valuer.NewString("p50")}
SpaceAggregationPercentile75 = SpaceAggregation{valuer.NewString("p75")}
SpaceAggregationPercentile90 = SpaceAggregation{valuer.NewString("p90")}
SpaceAggregationPercentile95 = SpaceAggregation{valuer.NewString("p95")}
SpaceAggregationPercentile99 = SpaceAggregation{valuer.NewString("p99")}
SpaceAggregationHistogramCount = SpaceAggregation{valuer.NewString("histogram_count")}
SpaceAggregationUnspecified = SpaceAggregation{valuer.NewString("")}
SpaceAggregationSum = SpaceAggregation{valuer.NewString("sum")}
SpaceAggregationAvg = SpaceAggregation{valuer.NewString("avg")}
SpaceAggregationMin = SpaceAggregation{valuer.NewString("min")}
SpaceAggregationMax = SpaceAggregation{valuer.NewString("max")}
SpaceAggregationCount = SpaceAggregation{valuer.NewString("count")}
SpaceAggregationPercentile50 = SpaceAggregation{valuer.NewString("p50")}
SpaceAggregationPercentile75 = SpaceAggregation{valuer.NewString("p75")}
SpaceAggregationPercentile90 = SpaceAggregation{valuer.NewString("p90")}
SpaceAggregationPercentile95 = SpaceAggregation{valuer.NewString("p95")}
SpaceAggregationPercentile99 = SpaceAggregation{valuer.NewString("p99")}
)
func (SpaceAggregation) Enum() []any {
@@ -216,7 +214,6 @@ func (SpaceAggregation) Enum() []any {
SpaceAggregationPercentile90,
SpaceAggregationPercentile95,
SpaceAggregationPercentile99,
SpaceAggregationHistogramCount,
}
}
@@ -259,12 +256,3 @@ type MetricTableHints struct {
type MetricValueFilter struct {
Value float64
}
type ComparisonSpaceAggregationParam struct {
Operater string `json:"operator"`
Threshold float64 `json:"threshold"`
}
func (param ComparisonSpaceAggregationParam) StringValue() string {
return fmt.Sprintf("{\"operator\": \"%s\", \"limit\": \"%f\"}", param.Operater, param.Threshold)
}

View File

@@ -446,8 +446,6 @@ type MetricAggregation struct {
TimeAggregation metrictypes.TimeAggregation `json:"timeAggregation"`
// space aggregation to apply to the query
SpaceAggregation metrictypes.SpaceAggregation `json:"spaceAggregation"`
// param for space aggregation if needed
ComparisonSpaceAggregationParam *metrictypes.ComparisonSpaceAggregationParam `json:"comparisonSpaceAggregationParam"`
// table hints to use for the query
TableHints *metrictypes.MetricTableHints `json:"-"`
// value filter to apply to the query

View File

@@ -3,7 +3,6 @@ package roletypes
import (
"encoding/json"
"regexp"
"slices"
"time"
"github.com/SigNoz/signoz/pkg/errors"
@@ -84,16 +83,6 @@ type PatchableRole struct {
Description string `json:"description" required:"true"`
}
type PatchableObjects struct {
Additions []*authtypes.Object `json:"additions" required:"true"`
Deletions []*authtypes.Object `json:"deletions" required:"true"`
}
type GettableResources struct {
Resources []*authtypes.Resource `json:"resources" required:"true"`
Relations map[authtypes.Type][]authtypes.Relation `json:"relations" required:"true"`
}
func NewStorableRoleFromRole(role *Role) *StorableRole {
return &StorableRole{
Identifiable: role.Identifiable,
@@ -142,15 +131,8 @@ func NewManagedRoles(orgID valuer.UUID) []*Role {
}
func NewGettableResources(resources []*authtypes.Resource) *GettableResources {
return &GettableResources{
Resources: resources,
Relations: authtypes.TypeableRelations,
}
}
func (role *Role) PatchMetadata(description string) error {
err := role.CanEditDelete()
err := role.ErrIfManaged()
if err != nil {
return err
}
@@ -160,32 +142,7 @@ func (role *Role) PatchMetadata(description string) error {
return nil
}
func (role *Role) NewPatchableObjects(additions []*authtypes.Object, deletions []*authtypes.Object, relation authtypes.Relation) (*PatchableObjects, error) {
err := role.CanEditDelete()
if err != nil {
return nil, err
}
if len(additions) == 0 && len(deletions) == 0 {
return nil, errors.New(errors.TypeInvalidInput, ErrCodeRoleEmptyPatch, "empty object patch request received, at least one of additions or deletions must be present")
}
for _, object := range additions {
if !slices.Contains(authtypes.TypeableRelations[object.Resource.Type], relation) {
return nil, errors.Newf(errors.TypeInvalidInput, authtypes.ErrCodeAuthZInvalidRelation, "relation %s is invalid for type %s", relation.StringValue(), object.Resource.Type.StringValue())
}
}
for _, object := range deletions {
if !slices.Contains(authtypes.TypeableRelations[object.Resource.Type], relation) {
return nil, errors.Newf(errors.TypeInvalidInput, authtypes.ErrCodeAuthZInvalidRelation, "relation %s is invalid for type %s", relation.StringValue(), object.Resource.Type.StringValue())
}
}
return &PatchableObjects{Additions: additions, Deletions: deletions}, nil
}
func (role *Role) CanEditDelete() error {
func (role *Role) ErrIfManaged() error {
if role.Type == RoleTypeManaged {
return errors.Newf(errors.TypeInvalidInput, ErrCodeRoleInvalidInput, "cannot edit/delete managed role: %s", role.Name)
}

View File

@@ -0,0 +1,48 @@
import json
from typing import Optional
import requests
from wiremock.client import WireMockMatchers
from fixtures import types
TEST_KEY_ID = "test-key-id-001"
TEST_LIMIT_ID = "test-limit-id-001"
def common_gateway_headers():
"""Common headers expected on requests forwarded to the gateway."""
return {
"X-Signoz-Cloud-Api-Key": {WireMockMatchers.EQUAL_TO: "secret-key"},
"X-Consumer-Username": {
WireMockMatchers.EQUAL_TO: "lid:00000000-0000-0000-0000-000000000000"
},
"X-Consumer-Groups": {WireMockMatchers.EQUAL_TO: "ns:default"},
}
def get_gateway_requests(signoz: types.SigNoz, method: str, url: str) -> list:
"""Return captured requests from the WireMock gateway journal.
Returns an empty list when no requests match or the admin API is unreachable.
"""
response = requests.post(
signoz.gateway.host_configs["8080"].get("/__admin/requests/find"),
json={"method": method, "url": url},
timeout=5,
)
return response.json().get("requests", [])
def get_latest_gateway_request_body(
signoz: types.SigNoz, method: str, url: str
) -> Optional[dict]:
"""Return the parsed JSON body of the most recent matching gateway request.
WireMock returns requests in reverse chronological order, so ``matched[0]``
is always the latest. Returns ``None`` when no matching request is found.
"""
matched = get_gateway_requests(signoz, method, url)
if not matched:
return None
return json.loads(matched[0]["body"])

View File

@@ -52,7 +52,6 @@ def build_builder_query(
time_aggregation: str,
space_aggregation: str,
*,
comparisonSpaceAggregationParam: Optional[Dict] = None,
temporality: Optional[str] = None,
step_interval: int = DEFAULT_STEP_INTERVAL,
group_by: Optional[List[str]] = None,
@@ -75,8 +74,7 @@ def build_builder_query(
}
if temporality:
spec["aggregations"][0]["temporality"] = temporality
if comparisonSpaceAggregationParam:
spec["aggregations"][0]["comparisonSpaceAggregationParam"] = comparisonSpaceAggregationParam
if group_by:
spec["groupBy"] = [
{

View File

@@ -0,0 +1,424 @@
from http import HTTPStatus
from typing import Callable, List
import requests
from wiremock.client import (
HttpMethods,
Mapping,
MappingRequest,
MappingResponse,
)
from fixtures import types
from fixtures.auth import USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD, add_license
from fixtures.gatewayutils import (
TEST_KEY_ID,
common_gateway_headers,
get_gateway_requests,
get_latest_gateway_request_body,
)
from fixtures.logger import setup_logger
logger = setup_logger(__name__)
def test_apply_license(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, List[Mapping]], None],
get_token: Callable[[str, str], str],
) -> None:
"""Activate a license so that all subsequent gateway calls succeed."""
add_license(signoz, make_http_mocks, get_token)
# ---------------------------------------------------------------------------
# Ingestion key CRUD
# ---------------------------------------------------------------------------
def test_create_ingestion_key(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""POST /api/v2/gateway/ingestion_keys creates a key via the gateway."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.POST,
url="/v1/workspaces/me/keys",
headers=common_gateway_headers(),
),
response=MappingResponse(
status=201,
json_body={
"status": "success",
"data": {
"id": TEST_KEY_ID,
"value": "ingestion-key-secret-value",
},
},
),
persistent=False,
),
],
)
response = requests.post(
signoz.self.host_configs["8080"].get("/api/v2/gateway/ingestion_keys"),
json={
"name": "my-test-key",
"tags": ["env:test", "team:platform"],
"expires_at": "2030-01-01T00:00:00Z",
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.CREATED
), f"Expected 201, got {response.status_code}: {response.text}"
data = response.json()["data"]
assert data["id"] == TEST_KEY_ID
assert data["value"] == "ingestion-key-secret-value"
# Verify the body forwarded to the gateway
body = get_latest_gateway_request_body(signoz, "POST", "/v1/workspaces/me/keys")
assert body is not None, "Expected a POST request to reach the gateway"
assert body["name"] == "my-test-key"
assert body["tags"] == ["env:test", "team:platform"]
def test_get_ingestion_keys(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""GET /api/v2/gateway/ingestion_keys lists keys via the gateway."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
# Default page=1, per_page=10 → gateway gets ?page=1&per_page=10
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.GET,
url="/v1/workspaces/me/keys?page=1&per_page=10",
headers=common_gateway_headers(),
),
response=MappingResponse(
status=200,
json_body={
"data": [
{
"id": TEST_KEY_ID,
"name": "my-test-key",
"value": "secret",
"expires_at": "2030-01-01T00:00:00Z",
"tags": ["env:test"],
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"workspace_id": "ws-1",
"limits": [],
}
],
"_pagination": {
"page": 1,
"per_page": 10,
"pages": 1,
"total": 1,
},
},
),
persistent=False,
),
],
)
response = requests.get(
signoz.self.host_configs["8080"].get("/api/v2/gateway/ingestion_keys"),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.OK
), f"Expected 200, got {response.status_code}: {response.text}"
data = response.json()["data"]
assert len(data["keys"]) == 1
assert data["keys"][0]["id"] == TEST_KEY_ID
assert data["keys"][0]["name"] == "my-test-key"
assert data["_pagination"]["total"] == 1
def test_get_ingestion_keys_custom_pagination(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""GET /api/v2/gateway/ingestion_keys with custom pagination params."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.GET,
url="/v1/workspaces/me/keys?page=2&per_page=5",
headers=common_gateway_headers(),
),
response=MappingResponse(
status=200,
json_body={
"data": [],
"_pagination": {
"page": 2,
"per_page": 5,
"pages": 1,
"total": 3,
},
},
),
persistent=False,
),
],
)
response = requests.get(
signoz.self.host_configs["8080"].get(
"/api/v2/gateway/ingestion_keys?page=2&per_page=5"
),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.OK
), f"Expected 200, got {response.status_code}: {response.text}"
data = response.json()["data"]
assert len(data["keys"]) == 0
assert data["_pagination"]["page"] == 2
assert data["_pagination"]["per_page"] == 5
def test_search_ingestion_keys(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""GET /api/v2/gateway/ingestion_keys/search searches keys by name."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
# name, page, per_page are sorted alphabetically by Go url.Values.Encode()
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.GET,
url="/v1/workspaces/me/keys/search?name=my-test&page=1&per_page=10",
headers=common_gateway_headers(),
),
response=MappingResponse(
status=200,
json_body={
"data": [
{
"id": TEST_KEY_ID,
"name": "my-test-key",
"value": "secret",
"expires_at": "2030-01-01T00:00:00Z",
"tags": ["env:test"],
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"workspace_id": "ws-1",
"limits": [],
}
],
"_pagination": {
"page": 1,
"per_page": 10,
"pages": 1,
"total": 1,
},
},
),
persistent=False,
),
],
)
response = requests.get(
signoz.self.host_configs["8080"].get(
"/api/v2/gateway/ingestion_keys/search?name=my-test"
),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.OK
), f"Expected 200, got {response.status_code}: {response.text}"
data = response.json()["data"]
assert len(data["keys"]) == 1
assert data["keys"][0]["name"] == "my-test-key"
def test_search_ingestion_keys_empty(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Search returns an empty list when no keys match."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.GET,
url="/v1/workspaces/me/keys/search?name=nonexistent&page=1&per_page=10",
headers=common_gateway_headers(),
),
response=MappingResponse(
status=200,
json_body={
"data": [],
"_pagination": {
"page": 1,
"per_page": 10,
"pages": 0,
"total": 0,
},
},
),
persistent=False,
),
],
)
response = requests.get(
signoz.self.host_configs["8080"].get(
"/api/v2/gateway/ingestion_keys/search?name=nonexistent"
),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.OK
), f"Expected 200, got {response.status_code}: {response.text}"
data = response.json()["data"]
assert len(data["keys"]) == 0
assert data["_pagination"]["total"] == 0
def test_update_ingestion_key(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""PATCH /api/v2/gateway/ingestion_keys/{keyId} updates a key via the gateway."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.PATCH,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(status=204),
persistent=False,
),
],
)
response = requests.patch(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/{TEST_KEY_ID}"
),
json={
"name": "renamed-key",
"tags": ["env:prod"],
"expires_at": "2031-06-15T00:00:00Z",
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.NO_CONTENT
), f"Expected 204, got {response.status_code}: {response.text}"
# Verify the body forwarded to the gateway
body = get_latest_gateway_request_body(signoz, "PATCH", gateway_url)
assert body is not None, "Expected a PATCH request to reach the gateway"
assert body["name"] == "renamed-key"
assert body["tags"] == ["env:prod"]
def test_delete_ingestion_key(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""DELETE /api/v2/gateway/ingestion_keys/{keyId} deletes a key via the gateway."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.DELETE,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(status=204),
persistent=False,
),
],
)
response = requests.delete(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/{TEST_KEY_ID}"
),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.NO_CONTENT
), f"Expected 204, got {response.status_code}: {response.text}"
# Verify at least one DELETE reached the gateway
matched = get_gateway_requests(signoz, "DELETE", gateway_url)
assert len(matched) >= 1, "Expected a DELETE request to reach the gateway"

View File

@@ -0,0 +1,418 @@
from http import HTTPStatus
from typing import Callable, List
import requests
from wiremock.client import (
HttpMethods,
Mapping,
MappingRequest,
MappingResponse,
)
from fixtures import types
from fixtures.auth import USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD, add_license
from fixtures.gatewayutils import (
TEST_KEY_ID,
TEST_LIMIT_ID,
common_gateway_headers,
get_gateway_requests,
get_latest_gateway_request_body,
)
from fixtures.logger import setup_logger
logger = setup_logger(__name__)
def test_apply_license(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, List[Mapping]], None],
get_token: Callable[[str, str], str],
) -> None:
"""Activate a license so that all subsequent gateway calls succeed."""
add_license(signoz, make_http_mocks, get_token)
# ---------------------------------------------------------------------------
# Create ingestion key limit
# ---------------------------------------------------------------------------
def test_create_ingestion_key_limit_only_size(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Creating a limit with only size omits count from the gateway payload."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}/limits"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.POST,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(
status=201,
json_body={
"status": "success",
"data": {"id": "limit-created-1"},
},
),
persistent=False,
),
],
)
response = requests.post(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/{TEST_KEY_ID}/limits"
),
json={
"signal": "logs",
"config": {"day": {"size": 1000}},
"tags": ["test"],
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.CREATED
), f"Expected 201, got {response.status_code}: {response.text}"
assert response.json()["data"]["id"] == "limit-created-1"
body = get_latest_gateway_request_body(signoz, "POST", gateway_url)
assert body is not None, "Expected a POST request to reach the gateway"
assert body["signal"] == "logs"
assert body["config"]["day"]["size"] == 1000
assert "count" not in body["config"]["day"], "count should be absent when not set"
assert "second" not in body["config"], "second should be absent when not set"
assert body["tags"] == ["test"]
def test_create_ingestion_key_limit_only_count(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Creating a limit with only count omits size from the gateway payload."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}/limits"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.POST,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(
status=201,
json_body={
"status": "success",
"data": {"id": "limit-created-2"},
},
),
persistent=False,
),
],
)
response = requests.post(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/{TEST_KEY_ID}/limits"
),
json={
"signal": "traces",
"config": {"day": {"count": 500}},
"tags": ["test"],
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.CREATED
), f"Expected 201, got {response.status_code}: {response.text}"
body = get_latest_gateway_request_body(signoz, "POST", gateway_url)
assert body is not None, "Expected a POST request to reach the gateway"
assert body["signal"] == "traces"
assert body["config"]["day"]["count"] == 500
assert "size" not in body["config"]["day"], "size should be absent when not set"
assert body["tags"] == ["test"]
def test_create_ingestion_key_limit_both_size_and_count(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Creating a limit with both size and count includes both in the gateway payload."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}/limits"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.POST,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(
status=201,
json_body={
"status": "success",
"data": {"id": "limit-created-3"},
},
),
persistent=False,
),
],
)
response = requests.post(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/{TEST_KEY_ID}/limits"
),
json={
"signal": "metrics",
"config": {
"day": {"size": 2000, "count": 750},
"second": {"size": 100, "count": 50},
},
"tags": ["test"],
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.CREATED
), f"Expected 201, got {response.status_code}: {response.text}"
body = get_latest_gateway_request_body(signoz, "POST", gateway_url)
assert body is not None, "Expected a POST request to reach the gateway"
assert body["signal"] == "metrics"
assert body["config"]["day"]["size"] == 2000
assert body["config"]["day"]["count"] == 750
assert body["config"]["second"]["size"] == 100
assert body["config"]["second"]["count"] == 50
assert body["tags"] == ["test"]
# ---------------------------------------------------------------------------
# Update ingestion key limit
# ---------------------------------------------------------------------------
def test_update_ingestion_key_limit_only_size(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Updating a limit with only size omits count from the gateway payload."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.PATCH,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(status=204),
persistent=False,
),
],
)
response = requests.patch(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/limits/{TEST_LIMIT_ID}"
),
json={
"config": {"day": {"size": 2000}},
"tags": ["test"],
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.NO_CONTENT
), f"Expected 204, got {response.status_code}: {response.text}"
body = get_latest_gateway_request_body(signoz, "PATCH", gateway_url)
assert body is not None, "Expected a PATCH request to reach the gateway"
assert body["config"]["day"]["size"] == 2000
assert "count" not in body["config"]["day"], "count should be absent when not set"
assert "second" not in body["config"], "second should be absent when not set"
assert body["tags"] == ["test"]
def test_update_ingestion_key_limit_only_count(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Updating a limit with only count omits size from the gateway payload."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.PATCH,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(status=204),
persistent=False,
),
],
)
response = requests.patch(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/limits/{TEST_LIMIT_ID}"
),
json={
"config": {"day": {"count": 750}},
"tags": ["test"],
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.NO_CONTENT
), f"Expected 204, got {response.status_code}: {response.text}"
body = get_latest_gateway_request_body(signoz, "PATCH", gateway_url)
assert body is not None, "Expected a PATCH request to reach the gateway"
assert body["config"]["day"]["count"] == 750
assert "size" not in body["config"]["day"], "size should be absent when not set"
assert body["tags"] == ["test"]
def test_update_ingestion_key_limit_both_size_and_count(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""Updating a limit with both size and count includes both in the gateway payload."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.PATCH,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(status=204),
persistent=False,
),
],
)
response = requests.patch(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/limits/{TEST_LIMIT_ID}"
),
json={
"config": {"day": {"size": 1000, "count": 500}},
"tags": ["test"],
},
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.NO_CONTENT
), f"Expected 204, got {response.status_code}: {response.text}"
body = get_latest_gateway_request_body(signoz, "PATCH", gateway_url)
assert body is not None, "Expected a PATCH request to reach the gateway"
assert body["config"]["day"]["size"] == 1000
assert body["config"]["day"]["count"] == 500
assert body["tags"] == ["test"]
# ---------------------------------------------------------------------------
# Delete ingestion key limit
# ---------------------------------------------------------------------------
def test_delete_ingestion_key_limit(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
make_http_mocks: Callable[[types.TestContainerDocker, list], None],
get_token: Callable[[str, str], str],
) -> None:
"""DELETE /api/v2/gateway/ingestion_keys/limits/{limitId} deletes a limit."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
make_http_mocks(
signoz.gateway,
[
Mapping(
request=MappingRequest(
method=HttpMethods.DELETE,
url=gateway_url,
headers=common_gateway_headers(),
),
response=MappingResponse(status=204),
persistent=False,
),
],
)
response = requests.delete(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/limits/{TEST_LIMIT_ID}"
),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert (
response.status_code == HTTPStatus.NO_CONTENT
), f"Expected 204, got {response.status_code}: {response.text}"
# Verify at least one DELETE reached the gateway
matched = get_gateway_requests(signoz, "DELETE", gateway_url)
assert len(matched) >= 1, "Expected a DELETE request to reach the gateway"

View File

@@ -353,7 +353,7 @@ def test_for_week_long_time_range(
metrics = Metrics.load_from_file(
MULTI_TEMPORALITY_FILE_10h,
base_time=now - timedelta(minutes=1441),
base_time=now - timedelta(minutes=600),
metric_name_override=metric_name,
)
insert_metrics(metrics)

View File

@@ -1,259 +0,0 @@
"""
Look at the multi_temporality_counters_1h.jsonl file for the relevant data
"""
import random
from datetime import datetime, timedelta, timezone
from http import HTTPStatus
from typing import Callable, List
import pytest
from fixtures import types
from fixtures.auth import USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD
from fixtures.metrics import Metrics
from fixtures.querier import (
build_builder_query,
get_all_series,
get_series_values,
make_query_request,
)
from fixtures.utils import get_testdata_file_path
FILE = get_testdata_file_path("histogram_data_1h.jsonl")
@pytest.mark.parametrize(
"threshold, operator, first_value, last_value",
[
(1000, "<=", 11, 69),
(100, "<=", 1.1, 6.9),
(7500, "<=", 16.75, 74.75),
(8000, "<=", 17, 75),
(80000, "<=", 17, 75), ## cuz we don't know the max value in infinity, all numbers beyond the biggest finite bucket will report the same answer
(1000, ">", 7, 7),
(100, ">", 16.9, 69.1),
(7500, ">", 1.25, 1.25),
(8000, ">", 1, 1),
(80000, ">", 1, 1), ## cuz we don't know the max value in infinity, all numbers beyond the biggest finite bucket will report the same answer
],
)
def test_histogram_count_for_one_endpoint(
signoz: types.SigNoz,
create_user_admin: None, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
insert_metrics: Callable[[List[Metrics]], None],
threshold: float,
operator: str,
first_value: float,
last_value: float,
) -> None:
now = datetime.now(tz=timezone.utc).replace(second=0, microsecond=0)
start_ms = int((now - timedelta(minutes=65)).timestamp() * 1000)
end_ms = int(now.timestamp() * 1000)
metric_name = f"test_bucket"
metrics = Metrics.load_from_file(
FILE,
base_time=now - timedelta(minutes=60),
metric_name_override=metric_name,
)
insert_metrics(metrics)
token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
query = build_builder_query(
"A",
metric_name,
"rate",
"histogram_count",
comparisonSpaceAggregationParam={
"threshold": threshold,
"operator": operator
},
filter_expression='endpoint = "/health"',
)
response = make_query_request(signoz, token, start_ms, end_ms, [query])
assert response.status_code == HTTPStatus.OK
data = response.json()
result_values = sorted(get_series_values(data, "A"), key=lambda x: x["timestamp"])
assert len(result_values) == 59
assert result_values[0]["value"] == first_value
assert result_values[-1]["value"] == last_value
@pytest.mark.parametrize(
"threshold, operator, first_value, last_value",
[
(1000, "<=", 22, 138),
(100, "<=", 2.2, 13.8),
(7500, "<=", 33.5, 149.5),
(8000, "<=", 34, 150),
(80000, "<=", 34, 150), ## cuz we don't know the max value in infinity, all numbers beyond the biggest finite bucket will report the same answer
(1000, ">", 14, 14),
(100, ">", 33.8, 138.2),
(7500, ">", 2.5, 2.5),
(8000, ">", 2, 2),
(80000, ">", 2, 2), ## cuz we don't know the max value in infinity, all numbers beyond the biggest finite bucket will report the same answer
],
)
def test_histogram_count_for_one_service(
signoz: types.SigNoz,
create_user_admin: None, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
insert_metrics: Callable[[List[Metrics]], None],
threshold: float,
operator: str,
first_value: float,
last_value: float,
) -> None:
now = datetime.now(tz=timezone.utc).replace(second=0, microsecond=0)
start_ms = int((now - timedelta(minutes=65)).timestamp() * 1000)
end_ms = int(now.timestamp() * 1000)
metric_name = f"test_bucket"
metrics = Metrics.load_from_file(
FILE,
base_time=now - timedelta(minutes=60),
metric_name_override=metric_name,
)
insert_metrics(metrics)
token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
query = build_builder_query(
"A",
metric_name,
"rate",
"histogram_count",
comparisonSpaceAggregationParam={
"threshold": threshold,
"operator": operator
},
filter_expression='service = "api"',
)
response = make_query_request(signoz, token, start_ms, end_ms, [query])
assert response.status_code == HTTPStatus.OK
data = response.json()
result_values = sorted(get_series_values(data, "A"), key=lambda x: x["timestamp"])
assert len(result_values) == 59
assert result_values[0]["value"] == first_value
assert result_values[-1]["value"] == last_value
@pytest.mark.parametrize(
"threshold, operator, first_value, last_value",
[
(1000, "<=", 11, 69),
(100, "<=", 1.1, 6.9),
(7500, "<=", 16.75, 74.75),
(8000, "<=", 17, 75),
(80000, "<=", 17, 75), ## cuz we don't know the max value in infinity, all numbers beyond the biggest finite bucket will report the same answer
(1000, ">", 7, 7),
(100, ">", 16.9, 69.1),
(7500, ">", 1.25, 1.25),
(8000, ">", 1, 1),
(80000, ">", 1, 1), ## cuz we don't know the max value in infinity, all numbers beyond the biggest finite bucket will report the same answer
],
)
def test_histogram_count_for_delta_service(
signoz: types.SigNoz,
create_user_admin: None, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
insert_metrics: Callable[[List[Metrics]], None],
threshold: float,
operator: str,
first_value: float,
last_value: float,
) -> None:
now = datetime.now(tz=timezone.utc).replace(second=0, microsecond=0)
start_ms = int((now - timedelta(minutes=65)).timestamp() * 1000)
end_ms = int(now.timestamp() * 1000)
metric_name = f"test_bucket"
metrics = Metrics.load_from_file(
FILE,
base_time=now - timedelta(minutes=60),
metric_name_override=metric_name,
)
insert_metrics(metrics)
token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
query = build_builder_query(
"A",
metric_name,
"rate",
"histogram_count",
comparisonSpaceAggregationParam={
"threshold": threshold,
"operator": operator
},
filter_expression='service = "web"',
)
response = make_query_request(signoz, token, start_ms, end_ms, [query])
assert response.status_code == HTTPStatus.OK
data = response.json()
result_values = sorted(get_series_values(data, "A"), key=lambda x: x["timestamp"])
assert len(result_values) == 60 ## in delta, the value at 10:01 will also be reported
assert result_values[1]["value"] == first_value ## to keep parallel to the cumulative test cases, first_value refers to the value at 10:02
assert result_values[-1]["value"] == last_value
@pytest.mark.parametrize(
"threshold, operator, first_value, last_value",
[
(1000, "<=", 33, 207),
(100, "<=", 3.3, 20.7),
(7500, "<=", 50.25, 224.25),
(8000, "<=", 51, 225),
(80000, "<=", 51, 225),
(1000, ">", 21, 21),
(100, ">", 50.7, 207.3),
(7500, ">", 3.75, 3.75),
(8000, ">", 3, 3),
(80000, ">", 3, 3),
],
)
def test_histogram_count_for_all_services(
signoz: types.SigNoz,
create_user_admin: None, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
insert_metrics: Callable[[List[Metrics]], None],
threshold: float,
operator: str,
first_value: float,
last_value: float,
) -> None:
now = datetime.now(tz=timezone.utc).replace(second=0, microsecond=0)
start_ms = int((now - timedelta(minutes=65)).timestamp() * 1000)
end_ms = int(now.timestamp() * 1000)
metric_name = f"test_bucket"
metrics = Metrics.load_from_file(
FILE,
base_time=now - timedelta(minutes=60),
metric_name_override=metric_name,
)
insert_metrics(metrics)
token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
query = build_builder_query(
"A",
metric_name,
"rate",
"histogram_count",
comparisonSpaceAggregationParam={
"threshold": threshold,
"operator": operator
},
## no services filter, this tests for multitemporality handling as well
)
response = make_query_request(signoz, token, start_ms, end_ms, [query])
assert response.status_code == HTTPStatus.OK
data = response.json()
result_values = sorted(get_series_values(data, "A"), key=lambda x: x["timestamp"])
assert len(result_values) == 60
assert result_values[1]["value"] == first_value ## to keep parallel to the cumulative test cases, first_value refers to the value at 10:02
assert result_values[-1]["value"] == last_value

View File

@@ -1,141 +0,0 @@
import random
from datetime import datetime, timedelta, timezone
from http import HTTPStatus
from typing import Callable, List
import pytest
from fixtures import types
from fixtures.auth import USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD
from fixtures.metrics import Metrics
from fixtures.querier import (
build_builder_query,
get_all_series,
get_series_values,
make_query_request,
)
from fixtures.utils import get_testdata_file_path
FILE = get_testdata_file_path("gauge_data_1h.jsonl")
@pytest.mark.parametrize(
"time_agg, space_agg, service, num_elements, start_val, first_val, twentieth_min_val, after_twentieth_min_val",
[
("avg", "avg", "api", 60, 400, 800, 800, 400),
("avg", "avg", "web", 50, 800, 800, 800, 600),
("avg", "avg", "lab", 60, 500, 700, 700, 500),
("sum", "sum", "api", 60, 400, 800, 800, 400),
("sum", "sum", "web", 50, 800, 800, 800, 600),
("sum", "sum", "lab", 60, 1000, 1400, 1400, 1000),
("max", "max", "api", 60, 400, 800, 800, 400),
("max", "max", "web", 50, 800, 800, 800, 600),
("max", "max", "lab", 60, 600, 800, 800, 600),
("avg", "sum", "api", 60, 400, 800, 800, 400),
("avg", "sum", "web", 50, 800, 800, 800, 600),
("avg", "sum", "lab", 60, 500, 700, 700, 500),
("max", "sum", "api", 60, 400, 800, 800, 400),
("max", "sum", "web", 50, 800, 800, 800, 600),
("max", "sum", "lab", 60, 600, 800, 800, 600),
],
)
def test_for_one_service(
signoz: types.SigNoz,
create_user_admin: None, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
insert_metrics: Callable[[List[Metrics]], None],
time_agg: str,
space_agg: str,
service: str,
num_elements: float,
start_val: float,
first_val: float,
twentieth_min_val: float,
after_twentieth_min_val: float ## web service has a gap of 10 mins after the 20th minute
) -> None:
now = datetime.now(tz=timezone.utc).replace(second=0, microsecond=0)
start_ms = int((now - timedelta(minutes=65)).timestamp() * 1000)
end_ms = int(now.timestamp() * 1000)
metric_name = f"test_memory_usage"
metrics = Metrics.load_from_file(
FILE,
base_time=now - timedelta(minutes=60),
metric_name_override=metric_name,
)
insert_metrics(metrics)
token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
query = build_builder_query(
"A",
metric_name,
time_agg,
space_agg,
filter_expression=f'service = "{service}"',
)
response = make_query_request(signoz, token, start_ms, end_ms, [query])
assert response.status_code == HTTPStatus.OK
data = response.json()
result_values = sorted(get_series_values(data, "A"), key=lambda x: x["timestamp"])
assert len(result_values) == num_elements
assert result_values[0]["value"] == start_val
assert result_values[1]["value"] == first_val
assert result_values[19]["value"] == twentieth_min_val
assert result_values[20]["value"] == after_twentieth_min_val
@pytest.mark.parametrize(
"time_agg, space_agg, start_val, first_val, twentieth_min_val, twenty_first_min_val, thirty_first_min_val",
[
("avg", "avg", 566.667, 766.667, 766.667, 450, 500),
("avg", "sum", 1700, 2300, 2300, 900, 1500),
("avg", "max", 800, 800, 800, 500, 600),
("max", "avg", 600, 800, 800, 500, 533.333),
("max", "sum", 1800, 2400, 2400, 1000, 1600),
("max", "max", 800, 800, 800, 600, 600),
],
)
def test_for_multiple_aggregations(
signoz: types.SigNoz,
create_user_admin: None, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
insert_metrics: Callable[[List[Metrics]], None],
time_agg: str,
space_agg: str,
start_val: float,
first_val: float,
twentieth_min_val: float,
twenty_first_min_val: float, ## web service has a gap of 10 mins after the 20th minute
thirty_first_min_val: float
) -> None:
now = datetime.now(tz=timezone.utc).replace(second=0, microsecond=0)
start_ms = int((now - timedelta(minutes=65)).timestamp() * 1000)
end_ms = int(now.timestamp() * 1000)
metric_name = f"test_memory_usage"
metrics = Metrics.load_from_file(
FILE,
base_time=now - timedelta(minutes=60),
metric_name_override=metric_name,
)
insert_metrics(metrics)
token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
query = build_builder_query(
"A",
metric_name,
time_agg,
space_agg,
)
response = make_query_request(signoz, token, start_ms, end_ms, [query])
assert response.status_code == HTTPStatus.OK
data = response.json()
result_values = sorted(get_series_values(data, "A"), key=lambda x: x["timestamp"])
assert len(result_values) == 60
assert result_values[0]["value"] == start_val
assert result_values[1]["value"] == first_val
assert result_values[19]["value"] == twentieth_min_val
assert result_values[20]["value"] == twenty_first_min_val
assert result_values[30]["value"] == thirty_first_min_val

View File

@@ -1,229 +0,0 @@
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:01:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:02:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:03:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:04:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:05:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:06:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:07:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:08:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:09:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:10:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:11:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:12:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:13:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:14:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:15:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:16:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:17:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:18:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:19:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:20:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:21:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:22:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:23:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:24:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:25:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:26:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:27:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:28:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:29:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:30:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:31:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:32:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:33:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:34:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:35:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:36:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:37:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:38:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:39:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:40:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:41:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:42:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:43:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:44:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:45:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:46:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:47:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:48:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:49:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:50:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:51:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:52:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:53:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:54:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:55:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:56:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:57:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:58:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T10:59:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"api"},"timestamp":"2025-01-10T11:00:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:01:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:02:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:03:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:04:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:05:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:06:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:07:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:08:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:09:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:10:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:11:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:12:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:13:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:14:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:15:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:16:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:17:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:18:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:19:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:20:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:31:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:32:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:33:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:34:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:35:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:36:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:37:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:38:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:39:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:40:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:41:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:42:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:43:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:44:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:45:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:46:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:47:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:48:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:49:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:50:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:51:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:52:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:53:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:54:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:55:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:56:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:57:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:58:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T10:59:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"web"},"timestamp":"2025-01-10T11:00:00+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:01:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:01:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:02:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:02:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:03:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:03:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:04:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:04:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:05:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:05:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:06:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:06:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:07:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:07:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:08:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:08:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:09:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:09:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:10:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:10:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:11:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:11:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:12:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:12:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:13:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:13:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:14:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:14:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:15:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:15:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:16:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:16:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:17:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:17:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:18:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:18:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:19:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:19:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:20:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:20:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:21:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:21:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:22:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:22:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:23:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:23:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:24:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:24:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:25:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:25:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:26:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:26:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:27:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:27:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:28:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:28:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:29:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:29:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:30:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:30:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:31:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:31:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:32:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:32:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:33:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:33:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:34:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:34:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:35:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:35:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:36:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:36:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:37:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:37:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:38:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:38:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:39:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:39:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:40:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:40:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:41:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:41:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:42:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:42:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:43:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:43:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:44:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:44:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:45:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:45:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:46:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:46:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:47:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:47:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:48:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:48:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:49:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:49:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:50:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:50:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:51:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:51:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:52:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:52:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:53:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:53:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:54:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:54:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:55:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:55:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:56:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:56:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:57:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:57:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:58:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:58:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:59:00+00:00","value":400,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T10:59:30+00:00","value":600,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}
{"metric_name":"system.memory.usage","labels":{"__temporality__":"Unspecified","service":"lab"},"timestamp":"2025-01-10T11:00:00+00:00","value":800,"temporality":"Unspecified","type_":"Gauge","is_monotonic":true,"flags":0,"description":"","unit":"","env":"default","resource_attrs":{},"scope_attrs":{}}

File diff suppressed because it is too large Load Diff