Skip to main content
Replace an E2M

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

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

name
string
required

Human-readable name for this 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.

type
enum<string>
required

E2 m type.

Available options:
E2M_TYPE_UNSPECIFIED,
E2M_TYPE_LOGS2METRICS,
E2M_TYPE_SPANS2METRICS
createTime
string

RFC3339 timestamp of when this E2M was created.

Example:

"2022-06-30T12:30:00.000Z"

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 of this E2M.

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

"avg and max the latency of catalog service"

id
string

Unique identifier for this E2M. Required on update requests.

Required string length: 36
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"d6a3658e-78d2-47d0-9b81-b2c551f01b09"

isInternal
boolean

Indicates whether this E2M is for internal use only.

logsQuery
SpansQuery · object

This data structure represents a query for logs.

metricFields
Metric Field · object[]

Metric fields to extract 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
permutations
E2M Permutations · object

This data structure represents the limit of events2metrics permutations and if the limit was exceeded

updateTime
string

RFC3339 timestamp of when this E2M was last updated.

Example:

"2022-06-30T12:30:00.000Z"

Response

200 - application/json

This data structure is obtained when replacing an existing event to metric definition

e2m
E2M · object
required

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