OpenTelemetry 1.0.0-Format - Amazon CloudWatch

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

OpenTelemetry 1.0.0-Format

Anmerkung

Beim Format OpenTelemetry 1.0.0 werden metrische Attribute als eine Liste von KeyValue Objekten kodiert und nicht als der StringKeyValue Typ, der im Format 0.7.0 verwendet wird. Für Verbraucher ist dies die einzige wichtige Änderung zwischen den Formaten 0.7.0 und 1.0.0. Ein aus den 0.7.0-Protodateien generierter Parser analysiert keine metrischen Attribute, die im Format 1.0.0 codiert sind. Das Gleiche gilt umgekehrt: Ein aus den 1.0.0-Protodateien generierter Parser analysiert keine im 0.7.0-Format kodierten metrischen Attribute.

OpenTelemetry ist eine Sammlung von Tools,, undAPIs. SDKs Sie können damit Telemetriedaten (Metriken, Protokolle und Traces) für Analysen instrumentieren, generieren, sammeln und exportieren. OpenTelemetry ist Teil der Cloud Native Computing Foundation. Weitere Informationen finden Sie unter OpenTelemetry.

Informationen zur vollständigen OpenTelemetry 1.0.0-Spezifikation finden Sie unter Release-Version 1.0.0.

Ein Kinesis-Datensatz kann eine oder mehrere ExportMetricsServiceRequest OpenTelemetry Datenstrukturen enthalten. Jede Datenstruktur beginnt mit einem Header mit einem UnsignedVarInt32, das die Datensatzlänge in Byte angibt. Jede ExportMetricsServiceRequest kann Daten von mehreren Metriken gleichzeitig enthalten.

Das Folgende ist eine Zeichenkettendarstellung der Botschaft der ExportMetricsServiceRequest OpenTelemetry Datenstruktur. OpenTelemetry serialisiert das Binärprotokoll von Google Protocol Buffers, und dieses ist nicht für Menschen lesbar.

resource_metrics { resource { attributes { key: "cloud.provider" value { string_value: "aws" } } attributes { key: "cloud.account.id" value { string_value: "123456789012" } } attributes { key: "cloud.region" value { string_value: "us-east-1" } } attributes { key: "aws.exporter.arn" value { string_value: "arn:aws:cloudwatch:us-east-1:123456789012:metric-stream/MyMetricStream" } } } scope_metrics { metrics { name: "amazonaws.com/AWS/DynamoDB/ConsumedReadCapacityUnits" unit: "NoneTranslated" summary { data_points { start_time_unix_nano: 60000000000 time_unix_nano: 120000000000 count: 1 sum: 1.0 quantile_values { value: 1.0 } quantile_values { quantile: 0.95 value: 1.0 } quantile_values { quantile: 0.99 value: 1.0 } quantile_values { quantile: 1.0 value: 1.0 } attributes { key: "Namespace" value { string_value: "AWS/DynamoDB" } } attributes { key: "MetricName" value { string_value: "ConsumedReadCapacityUnits" } } attributes { key: "Dimensions" value { kvlist_value { values { key: "TableName" value { string_value: "MyTable" } } } } } } data_points { start_time_unix_nano: 70000000000 time_unix_nano: 130000000000 count: 2 sum: 5.0 quantile_values { value: 2.0 } quantile_values { quantile: 1.0 value: 3.0 } attributes { key: "Namespace" value { string_value: "AWS/DynamoDB" } } attributes { key: "MetricName" value { string_value: "ConsumedReadCapacityUnits" } } attributes { key: "Dimensions" value { kvlist_value { values { key: "TableName" value { string_value: "MyTable" } } } } } } } } } }

Objekt der obersten Ebene zur Serialisierung von Metrikdaten OpenTelemetry

ExportMetricsServiceRequestist der Wrapper der obersten Ebene zum Serialisieren einer Export-Payload. OpenTelemetry Es enthält eine oder mehrere ResourceMetrics.

message ExportMetricsServiceRequest { // An array of ResourceMetrics. // For data coming from a single resource this array will typically contain one // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and // in that case this array will contain multiple elements. repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1; }

ResourceMetricsist das Objekt der obersten Ebene zur Darstellung von Objekten. MetricData

// A collection of ScopeMetrics from a Resource. message ResourceMetrics { reserved 1000; // The resource for the metrics in this message. // If this field is not set then no resource info is known. opentelemetry.proto.resource.v1.Resource resource = 1; // A list of metrics that originate from a resource. repeated ScopeMetrics scope_metrics = 2; // This schema_url applies to the data in the "resource" field. It does not apply // to the data in the "scope_metrics" field which have their own schema_url field. string schema_url = 3; }

Ressourcenobjekt

Ein Resource-Objekt ist ein Wertpaarobjekt, das Informationen über die Ressource enthält, die die Metriken generiert hat. Für Metriken AWS, die von erstellt wurden, enthält die Datenstruktur den Amazon-Ressourcennamen (ARN) der Ressource, die sich auf die Metrik bezieht, z. B. eine EC2 Instance oder ein S3-Bucket.

Das Resource-Objekt enthält ein Attribut namens attributes, das eine Liste von Schlüssel-Wert-Paaren speichert.

  • cloud.account.id enthält die Konto-ID

  • cloud.region enthält die Region

  • aws.exporter.arnenthält den Metrik-Stream ARN

  • cloud.provider ist immer aws.

// Resource information. message Resource { // Set of attributes that describe the resource. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; // dropped_attributes_count is the number of dropped attributes. If the value is 0, then // no attributes were dropped. uint32 dropped_attributes_count = 2; }

Das ScopeMetrics Objekt

Das scope-Feld wird nicht ausgefüllt. Wir füllen nur das Metrikfeld aus, das wir exportieren.

// A collection of Metrics produced by an Scope. message ScopeMetrics { // The instrumentation scope information for the metrics in this message. // Semantically when InstrumentationScope isn't set, it is equivalent with // an empty instrumentation scope name (unknown). opentelemetry.proto.common.v1.InstrumentationScope scope = 1; // A list of metrics that originate from an instrumentation library. repeated Metric metrics = 2; // This schema_url applies to all metrics in the "metrics" field. string schema_url = 3; }

Metrikobjekt

Das Metrikobjekt enthält einige Metadaten und ein Summary-Datenfeld, das eine Liste von SummaryDataPoint enthält.

Für Metrik-Streams lauten die Metadaten wie folgt:

message Metric { reserved 4, 6, 8; // name of the metric, including its DNS name prefix. It must be unique. string name = 1; // description of the metric, which can be used in documentation. string description = 2; // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. string unit = 3; // Data determines the aggregation type (if any) of the metric, what is the // reported value type for the data points, as well as the relatationship to // the time interval over which they are reported. oneof data { Gauge gauge = 5; Sum sum = 7; Histogram histogram = 9; ExponentialHistogram exponential_histogram = 10; Summary summary = 11; } } message Summary { repeated SummaryDataPoint data_points = 1; }

Das SummaryDataPoint Objekt

Das SummaryDataPoint Objekt enthält den Wert eines einzelnen Datenpunkts in einer Zeitreihe in einer DoubleSummary Metrik.

// SummaryDataPoint is a single data point in a timeseries that describes the // time-varying values of a Summary metric. message SummaryDataPoint { reserved 1; // The set of key/value pairs that uniquely identify the timeseries from // where this point belongs. The list may be empty (may contain 0 elements). // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; // StartTimeUnixNano is optional but strongly encouraged, see the // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. fixed64 start_time_unix_nano = 2; // TimeUnixNano is required, see the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. fixed64 time_unix_nano = 3; // count is the number of values in the population. Must be non-negative. fixed64 count = 4; // sum of the values in the population. If count is zero then this field // must be zero. // // Note: Sum should only be filled out when measuring non-negative discrete // events, and is assumed to be monotonic over the values of these events. // Negative events *can* be recorded, but sum should not be filled out when // doing so. This is specifically to enforce compatibility w/ OpenMetrics, // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary double sum = 5; // Represents the value at a given quantile of a distribution. // // To record Min and Max values following conventions are used: // - The 1.0 quantile is equivalent to the maximum value observed. // - The 0.0 quantile is equivalent to the minimum value observed. // // See the following issue for more context: // https://github.com/open-telemetry/opentelemetry-proto/issues/125 message ValueAtQuantile { // The quantile of a distribution. Must be in the interval // [0.0, 1.0]. double quantile = 1; // The value at the given quantile of a distribution. // // Quantile values must NOT be negative. double value = 2; } // (Optional) list of values at different quantiles of the distribution calculated // from the current snapshot. The quantiles must be strictly increasing. repeated ValueAtQuantile quantile_values = 6; // Flags that apply to this specific data point. See DataPointFlags // for the available flags and their meaning. uint32 flags = 8; }

Weitere Informationen finden Sie unter Übersetzungen im Format OpenTelemetry 1.0.0.