Skip to main content
Create a new E2M

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structure is used to create a new event to metric definition

name
string
required

Human-readable name for the new E2M.

Required string length: 1 - 255
Pattern: ^[\s\S]*$
Example:

"Service catalog latency"

spansQuery
SpansQuery · object
required

This data structure represents a query for spans.

dataSource
string

Optional data source in namespace/dataset_name format. If not set, defaults to the standard logs/spans stream.

Required string length: 1 - 300
Pattern: ^[\s\S]*$
Example:

"my_namespace/my_dataset"

description
string

Human-readable description for the new E2M.

Maximum string length: 2000
Pattern: ^[\s\S]*$
Example:

"avg and max the latency of catalog service"

logsQuery
SpansQuery · object

This data structure represents a query for logs.

metricFields
Metric Field · object[]

Metric fields to create and aggregate from the events.

Maximum array length: 10
metricLabels
Metric Label · object[]

Metric labels to attach to the generated metrics.

Maximum array length: 10
permutationsLimit
integer<int32>

Maximum number of unique metric permutations allowed for this E2M.

Required range: 1 <= x <= 10000000
Example:

30000

type
enum<string>

E2 m type.

Available options:
E2M_TYPE_UNSPECIFIED,
E2M_TYPE_LOGS2METRICS,
E2M_TYPE_SPANS2METRICS

Response

200 - application/json

Create e2m response.

e2m
E2M · object

This data structure represents an Event to Metrics (E2M) object.