@kopai/collector 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,5 @@
1
- //#region rolldown:runtime
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region \0rolldown/runtime.js
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -25,6 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
26
  }) : target, mod));
26
27
 
27
28
  //#endregion
29
+ let node_zlib = require("node:zlib");
28
30
  let fastify_type_provider_zod = require("fastify-type-provider-zod");
29
31
  let zod_v4 = require("zod/v4");
30
32
  let _kopai_core = require("@kopai/core");
@@ -676,6 +678,18 @@ const collectorRoutes = async function(fastify, opts) {
676
678
  fastify.setValidatorCompiler(fastify_type_provider_zod.validatorCompiler);
677
679
  fastify.setSerializerCompiler(fastify_type_provider_zod.serializerCompiler);
678
680
  fastify.setErrorHandler(collectorErrorHandler);
681
+ fastify.addHook("preParsing", async (request, _reply, payload) => {
682
+ const encoding = request.headers["content-encoding"];
683
+ if (encoding === "gzip" || encoding === "x-gzip") {
684
+ const contentLength = request.headers["content-length"];
685
+ delete request.headers["content-encoding"];
686
+ delete request.headers["content-length"];
687
+ const decompressed = payload.pipe((0, node_zlib.createGunzip)());
688
+ if (contentLength) Object.assign(decompressed, { receivedEncodedLength: parseInt(contentLength, 10) });
689
+ return decompressed;
690
+ }
691
+ return payload;
692
+ });
679
693
  fastify.register(protobufPlugin);
680
694
  fastify.register(metricsRoute, { writeMetricsDatasource: opts.telemetryDatasource });
681
695
  fastify.register(tracesRoute, { writeTracesDatasource: opts.telemetryDatasource });
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { createGunzip } from "node:zlib";
1
2
  import { serializerCompiler, validatorCompiler } from "fastify-type-provider-zod";
2
3
  import { z } from "zod/v4";
3
4
  import { otlpMetricsZod, otlpZod } from "@kopai/core";
@@ -648,6 +649,18 @@ const collectorRoutes = async function(fastify, opts) {
648
649
  fastify.setValidatorCompiler(validatorCompiler);
649
650
  fastify.setSerializerCompiler(serializerCompiler);
650
651
  fastify.setErrorHandler(collectorErrorHandler);
652
+ fastify.addHook("preParsing", async (request, _reply, payload) => {
653
+ const encoding = request.headers["content-encoding"];
654
+ if (encoding === "gzip" || encoding === "x-gzip") {
655
+ const contentLength = request.headers["content-length"];
656
+ delete request.headers["content-encoding"];
657
+ delete request.headers["content-length"];
658
+ const decompressed = payload.pipe(createGunzip());
659
+ if (contentLength) Object.assign(decompressed, { receivedEncodedLength: parseInt(contentLength, 10) });
660
+ return decompressed;
661
+ }
662
+ return payload;
663
+ });
651
664
  fastify.register(protobufPlugin);
652
665
  fastify.register(metricsRoute, { writeMetricsDatasource: opts.telemetryDatasource });
653
666
  fastify.register(tracesRoute, { writeTracesDatasource: opts.telemetryDatasource });
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/routes/metrics.ts","../src/routes/traces.ts","../src/routes/logs.ts","../src/routes/otlp-schemas.ts","../src/routes/field-violation.ts","../src/routes/errors.ts","../src/routes/error-handler.ts","../src/gen/opentelemetry/proto/common/v1/common_pb.ts","../src/gen/opentelemetry/proto/resource/v1/resource_pb.ts","../src/gen/opentelemetry/proto/trace/v1/trace_pb.ts","../src/gen/opentelemetry/proto/collector/trace/v1/trace_service_pb.ts","../src/gen/opentelemetry/proto/metrics/v1/metrics_pb.ts","../src/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_pb.ts","../src/gen/opentelemetry/proto/logs/v1/logs_pb.ts","../src/gen/opentelemetry/proto/collector/logs/v1/logs_service_pb.ts","../src/protobuf/converter.ts","../src/protobuf/plugin.ts","../src/index.ts"],"sourcesContent":["import { z } from \"zod/v4\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport { otlpMetricsZod, type datasource } from \"@kopai/core\";\n\n// https://github.com/open-telemetry/opentelemetry-specification/blob/49845849d2d8df07059f82033f39e96c561927cf/oteps/0122-otlp-http-json.md#response\nconst exportMetricsServiceResponseSchema = z.object({\n partialSuccess: z\n .object({\n rejectedDataPoints: z.string().optional(),\n errorMessage: z.string().optional(),\n })\n .optional(),\n});\n\nexport const metricsRoute: FastifyPluginAsyncZod<{\n writeMetricsDatasource: datasource.WriteMetricsDatasource;\n}> = async function (fastify, opts) {\n fastify.route({\n method: \"POST\",\n url: \"/v1/metrics\",\n schema: {\n body: otlpMetricsZod.metricsDataSchema,\n response: {\n 200: exportMetricsServiceResponseSchema,\n },\n },\n handler: async (req, res) => {\n const { rejectedDataPoints, errorMessage } =\n await opts.writeMetricsDatasource.writeMetrics(req.body);\n\n res.send({\n partialSuccess: {\n rejectedDataPoints,\n errorMessage,\n },\n });\n },\n });\n};\n","import { z } from \"zod/v4\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport { otlpZod, type datasource } from \"@kopai/core\";\n\n// https://github.com/open-telemetry/opentelemetry-specification/blob/49845849d2d8df07059f82033f39e96c561927cf/oteps/0122-otlp-http-json.md#response\nconst exportTracesServiceResponseSchema = z.object({\n partialSuccess: z\n .object({\n rejectedSpans: z.string().optional(),\n errorMessage: z.string().optional(),\n })\n .optional(),\n});\n\nexport const tracesRoute: FastifyPluginAsyncZod<{\n writeTracesDatasource: datasource.WriteTracesDatasource;\n}> = async function (fastify, opts) {\n fastify.route({\n method: \"POST\",\n url: \"/v1/traces\",\n schema: {\n body: otlpZod.tracesDataSchema,\n response: {\n 200: exportTracesServiceResponseSchema,\n },\n },\n handler: async (req, res) => {\n const { rejectedSpans, errorMessage } =\n await opts.writeTracesDatasource.writeTraces(req.body);\n\n res.send({\n partialSuccess: {\n rejectedSpans,\n errorMessage,\n },\n });\n },\n });\n};\n","import { z } from \"zod/v4\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport { otlpZod, type datasource } from \"@kopai/core\";\n\n// https://github.com/open-telemetry/opentelemetry-specification/blob/49845849d2d8df07059f82033f39e96c561927cf/oteps/0122-otlp-http-json.md#response\nconst exportLogsServiceResponseSchema = z.object({\n partialSuccess: z\n .object({\n rejectedLogRecords: z.string().optional(),\n errorMessage: z.string().optional(),\n })\n .optional(),\n});\n\nexport const logsRoute: FastifyPluginAsyncZod<{\n writeLogsDatasource: datasource.WriteLogsDatasource;\n}> = async function (fastify, opts) {\n fastify.route({\n method: \"POST\",\n url: \"/v1/logs\",\n schema: {\n body: otlpZod.logsDataSchema,\n response: {\n 200: exportLogsServiceResponseSchema,\n },\n },\n handler: async (req, res) => {\n const { rejectedLogRecords, errorMessage } =\n await opts.writeLogsDatasource.writeLogs(req.body);\n\n res.send({\n partialSuccess: {\n rejectedLogRecords,\n errorMessage,\n },\n });\n },\n });\n};\n","// https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#otlphttp-response\n\nimport { z } from \"zod/v4\";\nexport const grpcStatusCode = {\n OK: 0,\n CANCELLED: 1,\n UNKNOWN: 2,\n INVALID_ARGUMENT: 3,\n DEADLINE_EXCEEDED: 4,\n NOT_FOUND: 5,\n ALREADY_EXISTS: 6,\n PERMISSION_DENIED: 7,\n RESOURCE_EXHAUSTED: 8,\n FAILED_PRECONDITION: 9,\n ABORTED: 10,\n OUT_OF_RANGE: 11,\n UNIMPLEMENTED: 12,\n INTERNAL: 13,\n UNAVAILABLE: 14,\n DATA_LOSS: 15,\n UNAUTHENTICATED: 16,\n} as const;\n\nexport const grpcStatusSchema = z.object({\n message: z.string(),\n details: z.array(z.unknown()).optional(),\n});\n\nexport const grpcStatusCodeSchema = z.number().int().min(0).max(16);\n\nexport type GrpcStatusCode =\n (typeof grpcStatusCode)[keyof typeof grpcStatusCode];\n\n// Error response body for HTTP 4xx/5xx\nexport const otlpErrorResponseSchema = z.object({\n code: grpcStatusCodeSchema,\n // The Status.message field SHOULD contain a developer-facing error message as defined in Status message schema.\n message: z.string(),\n // The server MAY include Status.details field with additional details. Read below about what this field can contain in each specific failure case.\n details: z.array(z.unknown()).optional(),\n});\n\nexport type ErrorResponse = z.infer<typeof otlpErrorResponseSchema>;\n\n// Single field violation\nexport const fieldViolationSchema = z.object({\n field: z.string(), // path like \"resourceSpans[0].spans[2].traceId\"\n description: z.string(), // human-readable explanation\n reason: z.string().optional(), // e.g. \"INVALID_TRACE_ID\"\n});\n\nexport type FieldViolation = z.infer<typeof fieldViolationSchema>;\n\n// BadRequest detail\nexport const badRequestSchema = z.object({\n \"@type\": z.literal(\"type.googleapis.com/google.rpc.BadRequest\").optional(),\n fieldViolations: z.array(fieldViolationSchema),\n});\n\n/*\n * Full error response for HTTP 400\n *\n * example:\n *\n * {\n * \"code\": 3,\n * \"message\": \"invalid trace data\",\n * \"details\": [\n * {\n * \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n * \"fieldViolations\": [\n * {\n * \"field\": \"resourceSpans[0].scopeSpans[0].spans[0].traceId\",\n * \"description\": \"traceId must be 32 hex characters\",\n * \"reason\": \"INVALID_TRACE_ID\"\n * },\n * {\n * \"field\": \"resourceSpans[0].scopeSpans[0].spans[1].startTimeUnixNano\",\n * \"description\": \"startTimeUnixNano must be a positive integer\",\n * \"reason\": \"INVALID_TIMESTAMP\"\n * }\n * ]\n * }\n * ]\n * }\n */\nexport const otlpBadRequestErrorResponseSchema = z.object({\n code: z.number().int(),\n message: z.string(),\n details: z.array(badRequestSchema).optional(),\n});\n\nexport type OtlpBadRequestErrorResponse = z.infer<\n typeof otlpBadRequestErrorResponseSchema\n>;\n","import type { FastifySchemaValidationError } from \"fastify\";\nimport type { FieldViolation } from \"./otlp-schemas.js\";\n\nexport function extractLeafError(errors: unknown[][]): {\n path: (string | number)[];\n message: string;\n expected?: string;\n} {\n for (const branch of errors) {\n if (!Array.isArray(branch) || !branch.length) continue;\n const e = branch[0] as {\n code?: string;\n path?: (string | number)[];\n message?: string;\n expected?: string;\n errors?: unknown[][];\n };\n if (e?.code === \"invalid_union\" && e.errors) {\n const deeper = extractLeafError(e.errors);\n return {\n path: [...(e.path || []), ...deeper.path],\n message: deeper.message,\n expected: deeper.expected,\n };\n }\n return {\n path: e?.path || [],\n message: e?.message || \"Validation failed\",\n expected: e?.expected,\n };\n }\n return { path: [], message: \"Validation failed\" };\n}\n\nexport function toFieldViolation(\n error: FastifySchemaValidationError\n): FieldViolation {\n let field = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\") || \"\";\n let description = error.message ?? \"Validation failed\";\n\n if (error.keyword === \"invalid_union\" && error.params?.errors) {\n const leaf = extractLeafError(error.params.errors as unknown[][]);\n const leafPath = leaf.path\n .map((p) => (typeof p === \"number\" ? `[${p}]` : `.${p}`))\n .join(\"\")\n .replace(/^\\./, \"\");\n if (leafPath) {\n const sep = leafPath.startsWith(\"[\") ? \"\" : \".\";\n field = field ? `${field}${sep}${leafPath}` : leafPath;\n }\n description = leaf.expected ? `expected ${leaf.expected}` : leaf.message;\n }\n\n return { field: field || \"unknown\", description, reason: error.keyword };\n}\n","import type { GrpcStatusCode } from \"./otlp-schemas.js\";\n\nexport class CollectorError extends Error {\n constructor(\n message: string,\n public code: GrpcStatusCode\n ) {\n super(message);\n Object.setPrototypeOf(this, CollectorError.prototype);\n }\n}\n","import {\n type FastifyError,\n type FastifyReply,\n type FastifyRequest,\n} from \"fastify\";\n\nimport {\n type OtlpBadRequestErrorResponse,\n grpcStatusCode,\n type ErrorResponse,\n} from \"./otlp-schemas.js\";\nimport { toFieldViolation } from \"./field-violation.js\";\n\nimport { CollectorError } from \"./errors.js\";\n\nexport function collectorErrorHandler(\n error: FastifyError | Error | string,\n request: FastifyRequest,\n reply: FastifyReply\n) {\n if (isValidationError(error)) {\n return reply.status(400).send({\n code: grpcStatusCode.INVALID_ARGUMENT,\n message: \"Invalid data\",\n details: [\n {\n \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n fieldViolations: error.validation.map(toFieldViolation),\n },\n ],\n } satisfies OtlpBadRequestErrorResponse);\n }\n\n request.log.error(error);\n if (error instanceof CollectorError) {\n return reply.status(500).send({\n code: error.code,\n message: error.message,\n } satisfies ErrorResponse);\n }\n\n reply.status(500).send({ error: \"Internal Server Error\" });\n}\n\nfunction isFastifyError(error: unknown): error is FastifyError {\n return (\n error instanceof Error &&\n \"code\" in error &&\n typeof (error as FastifyError).code === \"string\"\n );\n}\n\nfunction isValidationError(\n error: unknown\n): error is FastifyError & Required<Pick<FastifyError, \"validation\">> {\n return (\n isFastifyError(error) &&\n \"validation\" in error &&\n Array.isArray((error as FastifyError).validation)\n );\n}\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/common/v1/common.proto (package opentelemetry.proto.common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/common/v1/common.proto.\n */\nexport const file_opentelemetry_proto_common_v1_common: GenFile = /*@__PURE__*/\n fileDesc(\"CipvcGVudGVsZW1ldHJ5L3Byb3RvL2NvbW1vbi92MS9jb21tb24ucHJvdG8SHW9wZW50ZWxlbWV0cnkucHJvdG8uY29tbW9uLnYxIowCCghBbnlWYWx1ZRIWCgxzdHJpbmdfdmFsdWUYASABKAlIABIUCgpib29sX3Z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W1vbi5WMWIGcHJvdG8z\");\n\n/**\n * Represents any type of attribute value. AnyValue may contain a\n * primitive value such as a string or integer or it may contain an arbitrary nested\n * object containing arrays, key-value lists and primitives.\n *\n * @generated from message opentelemetry.proto.common.v1.AnyValue\n */\nexport type AnyValue = Message<\"opentelemetry.proto.common.v1.AnyValue\"> & {\n /**\n * The value is one of the listed fields. It is valid for all values to be unspecified\n * in which case this AnyValue is considered to be \"empty\".\n *\n * @generated from oneof opentelemetry.proto.common.v1.AnyValue.value\n */\n value: {\n /**\n * @generated from field: string string_value = 1;\n */\n value: string;\n case: \"stringValue\";\n } | {\n /**\n * @generated from field: bool bool_value = 2;\n */\n value: boolean;\n case: \"boolValue\";\n } | {\n /**\n * @generated from field: int64 int_value = 3;\n */\n value: bigint;\n case: \"intValue\";\n } | {\n /**\n * @generated from field: double double_value = 4;\n */\n value: number;\n case: \"doubleValue\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.common.v1.ArrayValue array_value = 5;\n */\n value: ArrayValue;\n case: \"arrayValue\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6;\n */\n value: KeyValueList;\n case: \"kvlistValue\";\n } | {\n /**\n * @generated from field: bytes bytes_value = 7;\n */\n value: Uint8Array;\n case: \"bytesValue\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.AnyValue.\n * Use `create(AnyValueSchema)` to create a new message.\n */\nexport const AnyValueSchema: GenMessage<AnyValue> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 0);\n\n/**\n * ArrayValue is a list of AnyValue messages. We need ArrayValue as a message\n * since oneof in AnyValue does not allow repeated fields.\n *\n * @generated from message opentelemetry.proto.common.v1.ArrayValue\n */\nexport type ArrayValue = Message<\"opentelemetry.proto.common.v1.ArrayValue\"> & {\n /**\n * Array of values. The array may be empty (contain 0 elements).\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.AnyValue values = 1;\n */\n values: AnyValue[];\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.ArrayValue.\n * Use `create(ArrayValueSchema)` to create a new message.\n */\nexport const ArrayValueSchema: GenMessage<ArrayValue> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 1);\n\n/**\n * KeyValueList is a list of KeyValue messages. We need KeyValueList as a message\n * since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need\n * a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to\n * avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches\n * are semantically equivalent.\n *\n * @generated from message opentelemetry.proto.common.v1.KeyValueList\n */\nexport type KeyValueList = Message<\"opentelemetry.proto.common.v1.KeyValueList\"> & {\n /**\n * A collection of key/value pairs of key-value pairs. The list may be empty (may\n * contain 0 elements).\n *\n * The keys MUST be unique (it is not allowed to have more than one\n * value with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue values = 1;\n */\n values: KeyValue[];\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.KeyValueList.\n * Use `create(KeyValueListSchema)` to create a new message.\n */\nexport const KeyValueListSchema: GenMessage<KeyValueList> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 2);\n\n/**\n * Represents a key-value pair that is used to store Span attributes, Link\n * attributes, etc.\n *\n * @generated from message opentelemetry.proto.common.v1.KeyValue\n */\nexport type KeyValue = Message<\"opentelemetry.proto.common.v1.KeyValue\"> & {\n /**\n * The key name of the pair.\n *\n * @generated from field: string key = 1;\n */\n key: string;\n\n /**\n * The value of the pair.\n *\n * @generated from field: opentelemetry.proto.common.v1.AnyValue value = 2;\n */\n value?: AnyValue;\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.KeyValue.\n * Use `create(KeyValueSchema)` to create a new message.\n */\nexport const KeyValueSchema: GenMessage<KeyValue> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 3);\n\n/**\n * InstrumentationScope is a message representing the instrumentation scope information\n * such as the fully qualified name and version. \n *\n * @generated from message opentelemetry.proto.common.v1.InstrumentationScope\n */\nexport type InstrumentationScope = Message<\"opentelemetry.proto.common.v1.InstrumentationScope\"> & {\n /**\n * A name denoting the Instrumentation scope.\n * An empty instrumentation scope name means the name is unknown.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * Defines the version of the instrumentation scope.\n * An empty instrumentation scope version means the version is unknown.\n *\n * @generated from field: string version = 2;\n */\n version: string;\n\n /**\n * Additional attributes that describe the scope. [Optional].\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 3;\n */\n attributes: KeyValue[];\n\n /**\n * The number of attributes that were discarded. Attributes\n * can be discarded because their keys are too long or because there are too many\n * attributes. If this value is 0, then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 4;\n */\n droppedAttributesCount: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.InstrumentationScope.\n * Use `create(InstrumentationScopeSchema)` to create a new message.\n */\nexport const InstrumentationScopeSchema: GenMessage<InstrumentationScope> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 4);\n\n/**\n * A reference to an Entity.\n * Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs.\n *\n * Status: [Development]\n *\n * @generated from message opentelemetry.proto.common.v1.EntityRef\n */\nexport type EntityRef = Message<\"opentelemetry.proto.common.v1.EntityRef\"> & {\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the entity data\n * is recorded in. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n *\n * This schema_url applies to the data in this message and to the Resource attributes\n * referenced by id_keys and description_keys.\n * TODO: discuss if we are happy with this somewhat complicated definition of what\n * the schema_url applies to.\n *\n * This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.\n *\n * @generated from field: string schema_url = 1;\n */\n schemaUrl: string;\n\n /**\n * Defines the type of the entity. MUST not change during the lifetime of the entity.\n * For example: \"service\" or \"host\". This field is required and MUST not be empty\n * for valid entities.\n *\n * @generated from field: string type = 2;\n */\n type: string;\n\n /**\n * Attribute Keys that identify the entity.\n * MUST not change during the lifetime of the entity. The Id must contain at least one attribute.\n * These keys MUST exist in the containing {message}.attributes.\n *\n * @generated from field: repeated string id_keys = 3;\n */\n idKeys: string[];\n\n /**\n * Descriptive (non-identifying) attribute keys of the entity.\n * MAY change over the lifetime of the entity. MAY be empty.\n * These attribute keys are not part of entity's identity.\n * These keys MUST exist in the containing {message}.attributes.\n *\n * @generated from field: repeated string description_keys = 4;\n */\n descriptionKeys: string[];\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.EntityRef.\n * Use `create(EntityRefSchema)` to create a new message.\n */\nexport const EntityRefSchema: GenMessage<EntityRef> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 5);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/resource/v1/resource.proto (package opentelemetry.proto.resource.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { EntityRef, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/resource/v1/resource.proto.\n */\nexport const file_opentelemetry_proto_resource_v1_resource: GenFile = /*@__PURE__*/\n fileDesc(\"Ci5vcGVudGVsZW1ldHJ5L3Byb3RvL3Jlc291cmNlL3YxL3Jlc291cmNlLnByb3RvEh9vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxIqgBCghSZXNvdXJjZRI7CgphdHRyaWJ1dGVzGAEgAygLMicub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuS2V5VmFsdWUSIAoYZHJvcHBlZF9hdHRyaWJ1dGVzX2NvdW50GAIgASgNEj0KC2VudGl0eV9yZWZzGAMgAygLMigub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuRW50aXR5UmVmQoMBCiJpby5vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxQg1SZXNvdXJjZVByb3RvUAFaKmdvLm9wZW50ZWxlbWV0cnkuaW8vcHJvdG8vb3RscC9yZXNvdXJjZS92MaoCH09wZW5UZWxlbWV0cnkuUHJvdG8uUmVzb3VyY2UuVjFiBnByb3RvMw\", [file_opentelemetry_proto_common_v1_common]);\n\n/**\n * Resource information.\n *\n * @generated from message opentelemetry.proto.resource.v1.Resource\n */\nexport type Resource = Message<\"opentelemetry.proto.resource.v1.Resource\"> & {\n /**\n * Set of attributes that describe the resource.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;\n */\n attributes: KeyValue[];\n\n /**\n * The number of dropped attributes. If the value is 0, then\n * no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 2;\n */\n droppedAttributesCount: number;\n\n /**\n * Set of entities that participate in this Resource.\n *\n * Note: keys in the references MUST exist in attributes of this message.\n *\n * Status: [Development]\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.EntityRef entity_refs = 3;\n */\n entityRefs: EntityRef[];\n};\n\n/**\n * Describes the message opentelemetry.proto.resource.v1.Resource.\n * Use `create(ResourceSchema)` to create a new message.\n */\nexport const ResourceSchema: GenMessage<Resource> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_resource_v1_resource, 0);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/trace/v1/trace.proto (package opentelemetry.proto.trace.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { InstrumentationScope, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Resource } from \"../../resource/v1/resource_pb.js\";\nimport { file_opentelemetry_proto_resource_v1_resource } from \"../../resource/v1/resource_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/trace/v1/trace.proto.\n */\nexport const file_opentelemetry_proto_trace_v1_trace: GenFile = /*@__PURE__*/\n fileDesc(\"CihvcGVudGVsZW1ldHJ5L3Byb3RvL3RyYWNlL3YxL3RyYWNlLnByb3RvEhxvcGVudGVsZW1ldHJ5LnByb3RvLnRyYWNlLnYxIlEKClRyYWNlc0RhdG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k9UX1VTRRAAEiAKG1NQQU5fRkxBR1NfVFJBQ0VfRkxBR1NfTUFTSxD/ARIqCiVTUEFOX0ZMQUdTX0NPTlRFWFRfSEFTX0lTX1JFTU9URV9NQVNLEIACEiYKIVNQQU5fRkxBR1NfQ09OVEVYVF9JU19SRU1PVEVfTUFTSxCABEJ3Ch9pby5vcGVudGVsZW1ldHJ5LnByb3RvLnRyYWNlLnYxQgpUcmFjZVByb3RvUAFaJ2dvLm9wZW50ZWxlbWV0cnkuaW8vcHJvdG8vb3RscC90cmFjZS92MaoCHE9wZW5UZWxlbWV0cnkuUHJvdG8uVHJhY2UuVjFiBnByb3RvMw\", [file_opentelemetry_proto_common_v1_common, file_opentelemetry_proto_resource_v1_resource]);\n\n/**\n * TracesData represents the traces data that can be stored in a persistent storage,\n * OR can be embedded by other protocols that transfer OTLP traces data but do\n * not implement the OTLP protocol.\n *\n * The main difference between this message and collector protocol is that\n * in this message there will not be any \"control\" or \"metadata\" specific to\n * OTLP protocol.\n *\n * When new fields are added into this message, the OTLP request MUST be updated\n * as well.\n *\n * @generated from message opentelemetry.proto.trace.v1.TracesData\n */\nexport type TracesData = Message<\"opentelemetry.proto.trace.v1.TracesData\"> & {\n /**\n * An array of ResourceSpans.\n * For data coming from a single resource this array will typically contain\n * one element. Intermediary nodes that receive data from multiple origins\n * typically batch the data before forwarding further and in that case this\n * array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;\n */\n resourceSpans: ResourceSpans[];\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.TracesData.\n * Use `create(TracesDataSchema)` to create a new message.\n */\nexport const TracesDataSchema: GenMessage<TracesData> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 0);\n\n/**\n * A collection of ScopeSpans from a Resource.\n *\n * @generated from message opentelemetry.proto.trace.v1.ResourceSpans\n */\nexport type ResourceSpans = Message<\"opentelemetry.proto.trace.v1.ResourceSpans\"> & {\n /**\n * The resource for the spans in this message.\n * If this field is not set then no resource info is known.\n *\n * @generated from field: opentelemetry.proto.resource.v1.Resource resource = 1;\n */\n resource?: Resource;\n\n /**\n * A list of ScopeSpans that originate from a resource.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;\n */\n scopeSpans: ScopeSpans[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the resource data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"resource\" field. It does not apply\n * to the data in the \"scope_spans\" field which have their own schema_url field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.ResourceSpans.\n * Use `create(ResourceSpansSchema)` to create a new message.\n */\nexport const ResourceSpansSchema: GenMessage<ResourceSpans> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 1);\n\n/**\n * A collection of Spans produced by an InstrumentationScope.\n *\n * @generated from message opentelemetry.proto.trace.v1.ScopeSpans\n */\nexport type ScopeSpans = Message<\"opentelemetry.proto.trace.v1.ScopeSpans\"> & {\n /**\n * The instrumentation scope information for the spans in this message.\n * Semantically when InstrumentationScope isn't set, it is equivalent with\n * an empty instrumentation scope name (unknown).\n *\n * @generated from field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1;\n */\n scope?: InstrumentationScope;\n\n /**\n * A list of Spans that originate from an instrumentation scope.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.Span spans = 2;\n */\n spans: Span[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the span data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"scope\" field and all spans and span\n * events in the \"spans\" field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.ScopeSpans.\n * Use `create(ScopeSpansSchema)` to create a new message.\n */\nexport const ScopeSpansSchema: GenMessage<ScopeSpans> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 2);\n\n/**\n * A Span represents a single operation performed by a single component of the system.\n *\n * The next available field id is 17.\n *\n * @generated from message opentelemetry.proto.trace.v1.Span\n */\nexport type Span = Message<\"opentelemetry.proto.trace.v1.Span\"> & {\n /**\n * A unique identifier for a trace. All spans from the same trace share\n * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\n * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is required.\n *\n * @generated from field: bytes trace_id = 1;\n */\n traceId: Uint8Array;\n\n /**\n * A unique identifier for a span within a trace, assigned when the span\n * is created. The ID is an 8-byte array. An ID with all zeroes OR of length\n * other than 8 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is required.\n *\n * @generated from field: bytes span_id = 2;\n */\n spanId: Uint8Array;\n\n /**\n * trace_state conveys information about request position in multiple distributed tracing graphs.\n * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header\n * See also https://github.com/w3c/distributed-tracing for more details about this field.\n *\n * @generated from field: string trace_state = 3;\n */\n traceState: string;\n\n /**\n * The `span_id` of this span's parent span. If this is a root span, then this\n * field must be empty. The ID is an 8-byte array.\n *\n * @generated from field: bytes parent_span_id = 4;\n */\n parentSpanId: Uint8Array;\n\n /**\n * Flags, a bit field.\n *\n * Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n * Context specification. To read the 8-bit W3C trace flag, use\n * `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n *\n * See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n *\n * Bits 8 and 9 represent the 3 states of whether a span's parent\n * is remote. The states are (unknown, is not remote, is remote).\n * To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n * To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n *\n * When creating span messages, if the message is logically forwarded from another source\n * with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD\n * be copied as-is. If creating from a source that does not have an equivalent flags field\n * (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST\n * be set to zero.\n * Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n *\n * [Optional].\n *\n * @generated from field: fixed32 flags = 16;\n */\n flags: number;\n\n /**\n * A description of the span's operation.\n *\n * For example, the name can be a qualified method name or a file name\n * and a line number where the operation is called. A best practice is to use\n * the same display name at the same call point in an application.\n * This makes it easier to correlate spans in different traces.\n *\n * This field is semantically required to be set to non-empty string.\n * Empty value is equivalent to an unknown span name.\n *\n * This field is required.\n *\n * @generated from field: string name = 5;\n */\n name: string;\n\n /**\n * Distinguishes between spans generated in a particular context. For example,\n * two spans with the same name may be distinguished using `CLIENT` (caller)\n * and `SERVER` (callee) to identify queueing latency associated with the span.\n *\n * @generated from field: opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;\n */\n kind: Span_SpanKind;\n\n /**\n * The start time of the span. On the client side, this is the time\n * kept by the local machine where the span execution starts. On the server side, this\n * is the time when the server's application handler starts running.\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n *\n * This field is semantically required and it is expected that end_time >= start_time.\n *\n * @generated from field: fixed64 start_time_unix_nano = 7;\n */\n startTimeUnixNano: bigint;\n\n /**\n * The end time of the span. On the client side, this is the time\n * kept by the local machine where the span execution ends. On the server side, this\n * is the time when the server application handler stops running.\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n *\n * This field is semantically required and it is expected that end_time >= start_time.\n *\n * @generated from field: fixed64 end_time_unix_nano = 8;\n */\n endTimeUnixNano: bigint;\n\n /**\n * A collection of key/value pairs. Note, global attributes\n * like server name can be set using the resource API. Examples of attributes:\n *\n * \"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n * \"/http/server_latency\": 300\n * \"example.com/myattribute\": true\n * \"example.com/score\": 10.239\n *\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;\n */\n attributes: KeyValue[];\n\n /**\n * The number of attributes that were discarded. Attributes\n * can be discarded because their keys are too long or because there are too many\n * attributes. If this value is 0, then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 10;\n */\n droppedAttributesCount: number;\n\n /**\n * A collection of Event items.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.Span.Event events = 11;\n */\n events: Span_Event[];\n\n /**\n * The number of dropped events. If the value is 0, then no\n * events were dropped.\n *\n * @generated from field: uint32 dropped_events_count = 12;\n */\n droppedEventsCount: number;\n\n /**\n * A collection of Links, which are references from this span to a span\n * in the same or different trace.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.Span.Link links = 13;\n */\n links: Span_Link[];\n\n /**\n * The number of dropped links after the maximum size was\n * enforced. If this value is 0, then no links were dropped.\n *\n * @generated from field: uint32 dropped_links_count = 14;\n */\n droppedLinksCount: number;\n\n /**\n * An optional final status for this span. Semantically when Status isn't set, it means\n * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).\n *\n * @generated from field: opentelemetry.proto.trace.v1.Status status = 15;\n */\n status?: Status;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Span.\n * Use `create(SpanSchema)` to create a new message.\n */\nexport const SpanSchema: GenMessage<Span> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 3);\n\n/**\n * Event is a time-stamped annotation of the span, consisting of user-supplied\n * text description and key-value pairs.\n *\n * @generated from message opentelemetry.proto.trace.v1.Span.Event\n */\nexport type Span_Event = Message<\"opentelemetry.proto.trace.v1.Span.Event\"> & {\n /**\n * The time the event occurred.\n *\n * @generated from field: fixed64 time_unix_nano = 1;\n */\n timeUnixNano: bigint;\n\n /**\n * The name of the event.\n * This field is semantically required to be set to non-empty string.\n *\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * A collection of attribute key/value pairs on the event.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 3;\n */\n attributes: KeyValue[];\n\n /**\n * The number of dropped attributes. If the value is 0,\n * then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 4;\n */\n droppedAttributesCount: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Span.Event.\n * Use `create(Span_EventSchema)` to create a new message.\n */\nexport const Span_EventSchema: GenMessage<Span_Event> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 3, 0);\n\n/**\n * A pointer from the current span to another span in the same trace or in a\n * different trace. For example, this can be used in batching operations,\n * where a single batch handler processes multiple requests from different\n * traces or when the handler receives a request from a different project.\n *\n * @generated from message opentelemetry.proto.trace.v1.Span.Link\n */\nexport type Span_Link = Message<\"opentelemetry.proto.trace.v1.Span.Link\"> & {\n /**\n * A unique identifier of a trace that this linked span is part of. The ID is a\n * 16-byte array.\n *\n * @generated from field: bytes trace_id = 1;\n */\n traceId: Uint8Array;\n\n /**\n * A unique identifier for the linked span. The ID is an 8-byte array.\n *\n * @generated from field: bytes span_id = 2;\n */\n spanId: Uint8Array;\n\n /**\n * The trace_state associated with the link.\n *\n * @generated from field: string trace_state = 3;\n */\n traceState: string;\n\n /**\n * A collection of attribute key/value pairs on the link.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 4;\n */\n attributes: KeyValue[];\n\n /**\n * The number of dropped attributes. If the value is 0,\n * then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 5;\n */\n droppedAttributesCount: number;\n\n /**\n * Flags, a bit field.\n *\n * Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n * Context specification. To read the 8-bit W3C trace flag, use\n * `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n *\n * See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n *\n * Bits 8 and 9 represent the 3 states of whether the link is remote.\n * The states are (unknown, is not remote, is remote).\n * To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n * To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n *\n * Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n * When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.\n *\n * [Optional].\n *\n * @generated from field: fixed32 flags = 6;\n */\n flags: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Span.Link.\n * Use `create(Span_LinkSchema)` to create a new message.\n */\nexport const Span_LinkSchema: GenMessage<Span_Link> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 3, 1);\n\n/**\n * SpanKind is the type of span. Can be used to specify additional relationships between spans\n * in addition to a parent/child relationship.\n *\n * @generated from enum opentelemetry.proto.trace.v1.Span.SpanKind\n */\nexport enum Span_SpanKind {\n /**\n * Unspecified. Do NOT use as default.\n * Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.\n *\n * @generated from enum value: SPAN_KIND_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * Indicates that the span represents an internal operation within an application,\n * as opposed to an operation happening at the boundaries. Default value.\n *\n * @generated from enum value: SPAN_KIND_INTERNAL = 1;\n */\n INTERNAL = 1,\n\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote network request.\n *\n * @generated from enum value: SPAN_KIND_SERVER = 2;\n */\n SERVER = 2,\n\n /**\n * Indicates that the span describes a request to some remote service.\n *\n * @generated from enum value: SPAN_KIND_CLIENT = 3;\n */\n CLIENT = 3,\n\n /**\n * Indicates that the span describes a producer sending a message to a broker.\n * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship\n * between producer and consumer spans. A PRODUCER span ends when the message was accepted\n * by the broker while the logical processing of the message might span a much longer time.\n *\n * @generated from enum value: SPAN_KIND_PRODUCER = 4;\n */\n PRODUCER = 4,\n\n /**\n * Indicates that the span describes consumer receiving a message from a broker.\n * Like the PRODUCER kind, there is often no direct critical path latency relationship\n * between producer and consumer spans.\n *\n * @generated from enum value: SPAN_KIND_CONSUMER = 5;\n */\n CONSUMER = 5,\n}\n\n/**\n * Describes the enum opentelemetry.proto.trace.v1.Span.SpanKind.\n */\nexport const Span_SpanKindSchema: GenEnum<Span_SpanKind> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_trace_v1_trace, 3, 0);\n\n/**\n * The Status type defines a logical error model that is suitable for different\n * programming environments, including REST APIs and RPC APIs.\n *\n * @generated from message opentelemetry.proto.trace.v1.Status\n */\nexport type Status = Message<\"opentelemetry.proto.trace.v1.Status\"> & {\n /**\n * A developer-facing human readable error message.\n *\n * @generated from field: string message = 2;\n */\n message: string;\n\n /**\n * The status code.\n *\n * @generated from field: opentelemetry.proto.trace.v1.Status.StatusCode code = 3;\n */\n code: Status_StatusCode;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Status.\n * Use `create(StatusSchema)` to create a new message.\n */\nexport const StatusSchema: GenMessage<Status> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 4);\n\n/**\n * For the semantics of status codes see\n * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status\n *\n * @generated from enum opentelemetry.proto.trace.v1.Status.StatusCode\n */\nexport enum Status_StatusCode {\n /**\n * The default status.\n *\n * @generated from enum value: STATUS_CODE_UNSET = 0;\n */\n UNSET = 0,\n\n /**\n * The Span has been validated by an Application developer or Operator to \n * have completed successfully.\n *\n * @generated from enum value: STATUS_CODE_OK = 1;\n */\n OK = 1,\n\n /**\n * The Span contains an error.\n *\n * @generated from enum value: STATUS_CODE_ERROR = 2;\n */\n ERROR = 2,\n}\n\n/**\n * Describes the enum opentelemetry.proto.trace.v1.Status.StatusCode.\n */\nexport const Status_StatusCodeSchema: GenEnum<Status_StatusCode> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_trace_v1_trace, 4, 0);\n\n/**\n * SpanFlags represents constants used to interpret the\n * Span.flags field, which is protobuf 'fixed32' type and is to\n * be used as bit-fields. Each non-zero value defined in this enum is\n * a bit-mask. To extract the bit-field, for example, use an\n * expression like:\n *\n * (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)\n *\n * See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n *\n * Note that Span flags were introduced in version 1.1 of the\n * OpenTelemetry protocol. Older Span producers do not set this\n * field, consequently consumers should not rely on the absence of a\n * particular flag bit to indicate the presence of a particular feature.\n *\n * @generated from enum opentelemetry.proto.trace.v1.SpanFlags\n */\nexport enum SpanFlags {\n /**\n * The zero value for the enum. Should not be used for comparisons.\n * Instead use bitwise \"and\" with the appropriate mask as shown above.\n *\n * @generated from enum value: SPAN_FLAGS_DO_NOT_USE = 0;\n */\n DO_NOT_USE = 0,\n\n /**\n * Bits 0-7 are used for trace flags.\n *\n * @generated from enum value: SPAN_FLAGS_TRACE_FLAGS_MASK = 255;\n */\n TRACE_FLAGS_MASK = 255,\n\n /**\n * Bits 8 and 9 are used to indicate that the parent span or link span is remote.\n * Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.\n * Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote.\n *\n * @generated from enum value: SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;\n */\n CONTEXT_HAS_IS_REMOTE_MASK = 256,\n\n /**\n * @generated from enum value: SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;\n */\n CONTEXT_IS_REMOTE_MASK = 512,\n}\n\n/**\n * Describes the enum opentelemetry.proto.trace.v1.SpanFlags.\n */\nexport const SpanFlagsSchema: GenEnum<SpanFlags> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_trace_v1_trace, 0);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/collector/trace/v1/trace_service.proto (package opentelemetry.proto.collector.trace.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { ResourceSpans } from \"../../../trace/v1/trace_pb.js\";\nimport { file_opentelemetry_proto_trace_v1_trace } from \"../../../trace/v1/trace_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/collector/trace/v1/trace_service.proto.\n */\nexport const file_opentelemetry_proto_collector_trace_v1_trace_service: GenFile = /*@__PURE__*/\n fileDesc(\"CjpvcGVudGVsZW1ldHJ5L3Byb3RvL2NvbGxlY3Rvci90cmFjZS92MS90cmFjZV9zZXJ2aWNlLnByb3RvEiZvcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci50cmFjZS52MSJgChlFeHBvcnRUcmFjZVNlcnZpY2VSZXF1ZXN0EkMKDnJlc291cmNlX3NwYW5zGAEgAygLMisub3BlbnRlbGVtZXRyeS5wcm90by50cmFjZS52MS5SZXNvdXJjZVNwYW5zIngKGkV4cG9ydFRyYWNlU2VydmljZVJlc3BvbnNlEloKD3BhcnRpYWxfc3VjY2VzcxgBIAEoCzJBLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLnRyYWNlLnYxLkV4cG9ydFRyYWNlUGFydGlhbFN1Y2Nlc3MiSgoZRXhwb3J0VHJhY2VQYXJ0aWFsU3VjY2VzcxIWCg5yZWplY3RlZF9zcGFucxgBIAEoAxIVCg1lcnJvcl9tZXNzYWdlGAIgASgJMqIBCgxUcmFjZVNlcnZpY2USkQEKBkV4cG9ydBJBLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLnRyYWNlLnYxLkV4cG9ydFRyYWNlU2VydmljZVJlcXVlc3QaQi5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci50cmFjZS52MS5FeHBvcnRUcmFjZVNlcnZpY2VSZXNwb25zZSIAQpwBCilpby5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci50cmFjZS52MUIRVHJhY2VTZXJ2aWNlUHJvdG9QAVoxZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2NvbGxlY3Rvci90cmFjZS92MaoCJk9wZW5UZWxlbWV0cnkuUHJvdG8uQ29sbGVjdG9yLlRyYWNlLlYxYgZwcm90bzM\", [file_opentelemetry_proto_trace_v1_trace]);\n\n/**\n * @generated from message opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n */\nexport type ExportTraceServiceRequest = Message<\"opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\"> & {\n /**\n * An array of ResourceSpans.\n * For data coming from a single resource this array will typically contain one\n * element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n * data from multiple origins typically batch the data before forwarding further and\n * in that case this array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;\n */\n resourceSpans: ResourceSpans[];\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.\n * Use `create(ExportTraceServiceRequestSchema)` to create a new message.\n */\nexport const ExportTraceServiceRequestSchema: GenMessage<ExportTraceServiceRequest> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 0);\n\n/**\n * @generated from message opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n */\nexport type ExportTraceServiceResponse = Message<\"opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\"> & {\n /**\n * The details of a partially successful export request.\n *\n * If the request is only partially accepted\n * (i.e. when the server accepts only parts of the data and rejects the rest)\n * the server MUST initialize the `partial_success` field and MUST\n * set the `rejected_<signal>` with the number of items it rejected.\n *\n * Servers MAY also make use of the `partial_success` field to convey\n * warnings/suggestions to senders even when the request was fully accepted.\n * In such cases, the `rejected_<signal>` MUST have a value of `0` and\n * the `error_message` MUST be non-empty.\n *\n * A `partial_success` message with an empty value (rejected_<signal> = 0 and\n * `error_message` = \"\") is equivalent to it not being set/present. Senders\n * SHOULD interpret it the same way as in the full success case.\n *\n * @generated from field: opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;\n */\n partialSuccess?: ExportTracePartialSuccess;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.\n * Use `create(ExportTraceServiceResponseSchema)` to create a new message.\n */\nexport const ExportTraceServiceResponseSchema: GenMessage<ExportTraceServiceResponse> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 1);\n\n/**\n * @generated from message opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n */\nexport type ExportTracePartialSuccess = Message<\"opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\"> & {\n /**\n * The number of rejected spans.\n *\n * A `rejected_<signal>` field holding a `0` value indicates that the\n * request was fully accepted.\n *\n * @generated from field: int64 rejected_spans = 1;\n */\n rejectedSpans: bigint;\n\n /**\n * A developer-facing human-readable message in English. It should be used\n * either to explain why the server rejected parts of the data during a partial\n * success or to convey warnings/suggestions during a full success. The message\n * should offer guidance on how users can address such issues.\n *\n * error_message is an optional field. An error_message with an empty value\n * is equivalent to it not being set.\n *\n * @generated from field: string error_message = 2;\n */\n errorMessage: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.\n * Use `create(ExportTracePartialSuccessSchema)` to create a new message.\n */\nexport const ExportTracePartialSuccessSchema: GenMessage<ExportTracePartialSuccess> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 2);\n\n/**\n * Service that can be used to push spans between one Application instrumented with\n * OpenTelemetry and a collector, or between a collector and a central collector (in this\n * case spans are sent/received to/from multiple Applications).\n *\n * @generated from service opentelemetry.proto.collector.trace.v1.TraceService\n */\nexport const TraceService: GenService<{\n /**\n * @generated from rpc opentelemetry.proto.collector.trace.v1.TraceService.Export\n */\n export: {\n methodKind: \"unary\";\n input: typeof ExportTraceServiceRequestSchema;\n output: typeof ExportTraceServiceResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 0);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/metrics/v1/metrics.proto (package opentelemetry.proto.metrics.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { InstrumentationScope, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Resource } from \"../../resource/v1/resource_pb.js\";\nimport { file_opentelemetry_proto_resource_v1_resource } from \"../../resource/v1/resource_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/metrics/v1/metrics.proto.\n */\nexport const file_opentelemetry_proto_metrics_v1_metrics: GenFile = /*@__PURE__*/\n fileDesc(\"CixvcGVudGVsZW1ldHJ5L3Byb3RvL21ldHJpY3MvdjEvbWV0cmljcy5wcm90bxIeb3BlbnRlbGVtZXRyeS5wcm90by5tZXRyaWNzLnYxIlgKC01ldHJpY3NEYXRhEkkKEHJlc291cmNlX21ldHJpY3MYASADKAsyLy5vcGVudGVsZW1ldHJ5LnByb3RvLm1ldHJpY3MudjEuUmVzb3VyY2VNZXRyaWNzIq8BCg9SZXNvdXJjZU1ldHJpY3MSOwoIcmVzb3VyY2UYASABKAsyKS5vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxLlJlc291cmNlEkMKDXNjb3BlX21ldHJpY3MYAiADKAsyLC5vcGVudGVsZW1ldHJ5LnByb3RvLm1ldHJpY3MudjEuU2NvcGVNZXRyaWNzEhIKCnNjaGVtYV91cmwYAyABKAlKBgjoBxDpByKfAQoMU2NvcGVNZXRyaWNzEkIKBXNjb3BlGAEgASgLMjMub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuSW5zdHJ1bWVudGF0aW9uU2NvcGUSNwoHbWV0cmljcxg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nkucHJvdG8ubWV0cmljcy52MUIMTWV0cmljc1Byb3RvUAFaKWdvLm9wZW50ZWxlbWV0cnkuaW8vcHJvdG8vb3RscC9tZXRyaWNzL3YxqgIeT3BlblRlbGVtZXRyeS5Qcm90by5NZXRyaWNzLlYxYgZwcm90bzM\", [file_opentelemetry_proto_common_v1_common, file_opentelemetry_proto_resource_v1_resource]);\n\n/**\n * MetricsData represents the metrics data that can be stored in a persistent\n * storage, OR can be embedded by other protocols that transfer OTLP metrics\n * data but do not implement the OTLP protocol.\n *\n * MetricsData\n * └─── ResourceMetrics\n * ├── Resource\n * ├── SchemaURL\n * └── ScopeMetrics\n * ├── Scope\n * ├── SchemaURL\n * └── Metric\n * ├── Name\n * ├── Description\n * ├── Unit\n * └── data\n * ├── Gauge\n * ├── Sum\n * ├── Histogram\n * ├── ExponentialHistogram\n * └── Summary\n *\n * The main difference between this message and collector protocol is that\n * in this message there will not be any \"control\" or \"metadata\" specific to\n * OTLP protocol.\n *\n * When new fields are added into this message, the OTLP request MUST be updated\n * as well.\n *\n * @generated from message opentelemetry.proto.metrics.v1.MetricsData\n */\nexport type MetricsData = Message<\"opentelemetry.proto.metrics.v1.MetricsData\"> & {\n /**\n * An array of ResourceMetrics.\n * For data coming from a single resource this array will typically contain\n * one element. Intermediary nodes that receive data from multiple origins\n * typically batch the data before forwarding further and in that case this\n * array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;\n */\n resourceMetrics: ResourceMetrics[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.MetricsData.\n * Use `create(MetricsDataSchema)` to create a new message.\n */\nexport const MetricsDataSchema: GenMessage<MetricsData> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 0);\n\n/**\n * A collection of ScopeMetrics from a Resource.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ResourceMetrics\n */\nexport type ResourceMetrics = Message<\"opentelemetry.proto.metrics.v1.ResourceMetrics\"> & {\n /**\n * The resource for the metrics in this message.\n * If this field is not set then no resource info is known.\n *\n * @generated from field: opentelemetry.proto.resource.v1.Resource resource = 1;\n */\n resource?: Resource;\n\n /**\n * A list of metrics that originate from a resource.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;\n */\n scopeMetrics: ScopeMetrics[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the resource data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"resource\" field. It does not apply\n * to the data in the \"scope_metrics\" field which have their own schema_url field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ResourceMetrics.\n * Use `create(ResourceMetricsSchema)` to create a new message.\n */\nexport const ResourceMetricsSchema: GenMessage<ResourceMetrics> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 1);\n\n/**\n * A collection of Metrics produced by an Scope.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ScopeMetrics\n */\nexport type ScopeMetrics = Message<\"opentelemetry.proto.metrics.v1.ScopeMetrics\"> & {\n /**\n * The instrumentation scope information for the metrics in this message.\n * Semantically when InstrumentationScope isn't set, it is equivalent with\n * an empty instrumentation scope name (unknown).\n *\n * @generated from field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1;\n */\n scope?: InstrumentationScope;\n\n /**\n * A list of metrics that originate from an instrumentation library.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Metric metrics = 2;\n */\n metrics: Metric[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the metric data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"scope\" field and all metrics in the\n * \"metrics\" field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ScopeMetrics.\n * Use `create(ScopeMetricsSchema)` to create a new message.\n */\nexport const ScopeMetricsSchema: GenMessage<ScopeMetrics> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 2);\n\n/**\n * Defines a Metric which has one or more timeseries. The following is a\n * brief summary of the Metric data model. For more details, see:\n *\n * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md\n *\n * The data model and relation between entities is shown in the\n * diagram below. Here, \"DataPoint\" is the term used to refer to any\n * one of the specific data point value types, and \"points\" is the term used\n * to refer to any one of the lists of points contained in the Metric.\n *\n * - Metric is composed of a metadata and data.\n * - Metadata part contains a name, description, unit.\n * - Data is one of the possible types (Sum, Gauge, Histogram, Summary).\n * - DataPoint contains timestamps, attributes, and one of the possible value type\n * fields.\n *\n * Metric\n * +------------+\n * |name |\n * |description |\n * |unit | +------------------------------------+\n * |data |---> |Gauge, Sum, Histogram, Summary, ... |\n * +------------+ +------------------------------------+\n *\n * Data [One of Gauge, Sum, Histogram, Summary, ...]\n * +-----------+\n * |... | // Metadata about the Data.\n * |points |--+\n * +-----------+ |\n * | +---------------------------+\n * | |DataPoint 1 |\n * v |+------+------+ +------+ |\n * +-----+ ||label |label |...|label | |\n * | 1 |-->||value1|value2|...|valueN| |\n * +-----+ |+------+------+ +------+ |\n * | . | |+-----+ |\n * | . | ||value| |\n * | . | |+-----+ |\n * | . | +---------------------------+\n * | . | .\n * | . | .\n * | . | .\n * | . | +---------------------------+\n * | . | |DataPoint M |\n * +-----+ |+------+------+ +------+ |\n * | M |-->||label |label |...|label | |\n * +-----+ ||value1|value2|...|valueN| |\n * |+------+------+ +------+ |\n * |+-----+ |\n * ||value| |\n * |+-----+ |\n * +---------------------------+\n *\n * Each distinct type of DataPoint represents the output of a specific\n * aggregation function, the result of applying the DataPoint's\n * associated function of to one or more measurements.\n *\n * All DataPoint types have three common fields:\n * - Attributes includes key-value pairs associated with the data point\n * - TimeUnixNano is required, set to the end time of the aggregation\n * - StartTimeUnixNano is optional, but strongly encouraged for DataPoints\n * having an AggregationTemporality field, as discussed below.\n *\n * Both TimeUnixNano and StartTimeUnixNano values are expressed as\n * UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n *\n * # TimeUnixNano\n *\n * This field is required, having consistent interpretation across\n * DataPoint types. TimeUnixNano is the moment corresponding to when\n * the data point's aggregate value was captured.\n *\n * Data points with the 0 value for TimeUnixNano SHOULD be rejected\n * by consumers.\n *\n * # StartTimeUnixNano\n *\n * StartTimeUnixNano in general allows detecting when a sequence of\n * observations is unbroken. This field indicates to consumers the\n * start time for points with cumulative and delta\n * AggregationTemporality, and it should be included whenever possible\n * to support correct rate calculation. Although it may be omitted\n * when the start time is truly unknown, setting StartTimeUnixNano is\n * strongly encouraged.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Metric\n */\nexport type Metric = Message<\"opentelemetry.proto.metrics.v1.Metric\"> & {\n /**\n * The name of the metric.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * A description of the metric, which can be used in documentation.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The unit in which the metric value is reported. Follows the format\n * described by https://unitsofmeasure.org/ucum.html.\n *\n * @generated from field: string unit = 3;\n */\n unit: string;\n\n /**\n * Data determines the aggregation type (if any) of the metric, what is the\n * reported value type for the data points, as well as the relatationship to\n * the time interval over which they are reported.\n *\n * @generated from oneof opentelemetry.proto.metrics.v1.Metric.data\n */\n data: {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Gauge gauge = 5;\n */\n value: Gauge;\n case: \"gauge\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Sum sum = 7;\n */\n value: Sum;\n case: \"sum\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Histogram histogram = 9;\n */\n value: Histogram;\n case: \"histogram\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10;\n */\n value: ExponentialHistogram;\n case: \"exponentialHistogram\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Summary summary = 11;\n */\n value: Summary;\n case: \"summary\";\n } | { case: undefined; value?: undefined };\n\n /**\n * Additional metadata attributes that describe the metric. [Optional].\n * Attributes are non-identifying.\n * Consumers SHOULD NOT need to be aware of these attributes.\n * These attributes MAY be used to encode information allowing\n * for lossless roundtrip translation to / from another data model.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue metadata = 12;\n */\n metadata: KeyValue[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Metric.\n * Use `create(MetricSchema)` to create a new message.\n */\nexport const MetricSchema: GenMessage<Metric> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 3);\n\n/**\n * Gauge represents the type of a scalar metric that always exports the\n * \"current value\" for every data point. It should be used for an \"unknown\"\n * aggregation.\n *\n * A Gauge does not support different aggregation temporalities. Given the\n * aggregation is unknown, points cannot be combined using the same\n * aggregation, regardless of aggregation temporalities. Therefore,\n * AggregationTemporality is not included. Consequently, this also means\n * \"StartTimeUnixNano\" is ignored for all data points.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Gauge\n */\nexport type Gauge = Message<\"opentelemetry.proto.metrics.v1.Gauge\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;\n */\n dataPoints: NumberDataPoint[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Gauge.\n * Use `create(GaugeSchema)` to create a new message.\n */\nexport const GaugeSchema: GenMessage<Gauge> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 4);\n\n/**\n * Sum represents the type of a scalar metric that is calculated as a sum of all\n * reported measurements over a time interval.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Sum\n */\nexport type Sum = Message<\"opentelemetry.proto.metrics.v1.Sum\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;\n */\n dataPoints: NumberDataPoint[];\n\n /**\n * aggregation_temporality describes if the aggregator reports delta changes\n * since last report time, or cumulative changes since a fixed start time.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;\n */\n aggregationTemporality: AggregationTemporality;\n\n /**\n * Represents whether the sum is monotonic.\n *\n * @generated from field: bool is_monotonic = 3;\n */\n isMonotonic: boolean;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Sum.\n * Use `create(SumSchema)` to create a new message.\n */\nexport const SumSchema: GenMessage<Sum> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 5);\n\n/**\n * Histogram represents the type of a metric that is calculated by aggregating\n * as a Histogram of all reported measurements over a time interval.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Histogram\n */\nexport type Histogram = Message<\"opentelemetry.proto.metrics.v1.Histogram\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;\n */\n dataPoints: HistogramDataPoint[];\n\n /**\n * aggregation_temporality describes if the aggregator reports delta changes\n * since last report time, or cumulative changes since a fixed start time.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;\n */\n aggregationTemporality: AggregationTemporality;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Histogram.\n * Use `create(HistogramSchema)` to create a new message.\n */\nexport const HistogramSchema: GenMessage<Histogram> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 6);\n\n/**\n * ExponentialHistogram represents the type of a metric that is calculated by aggregating\n * as a ExponentialHistogram of all reported double measurements over a time interval.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ExponentialHistogram\n */\nexport type ExponentialHistogram = Message<\"opentelemetry.proto.metrics.v1.ExponentialHistogram\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;\n */\n dataPoints: ExponentialHistogramDataPoint[];\n\n /**\n * aggregation_temporality describes if the aggregator reports delta changes\n * since last report time, or cumulative changes since a fixed start time.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;\n */\n aggregationTemporality: AggregationTemporality;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ExponentialHistogram.\n * Use `create(ExponentialHistogramSchema)` to create a new message.\n */\nexport const ExponentialHistogramSchema: GenMessage<ExponentialHistogram> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 7);\n\n/**\n * Summary metric data are used to convey quantile summaries,\n * a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)\n * and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)\n * data type. These data points cannot always be merged in a meaningful way.\n * While they can be useful in some applications, histogram data points are\n * recommended for new applications.\n * Summary metrics do not have an aggregation temporality field. This is\n * because the count and sum fields of a SummaryDataPoint are assumed to be\n * cumulative values.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Summary\n */\nexport type Summary = Message<\"opentelemetry.proto.metrics.v1.Summary\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;\n */\n dataPoints: SummaryDataPoint[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Summary.\n * Use `create(SummarySchema)` to create a new message.\n */\nexport const SummarySchema: GenMessage<Summary> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 8);\n\n/**\n * NumberDataPoint is a single data point in a timeseries that describes the\n * time-varying scalar value of a metric.\n *\n * @generated from message opentelemetry.proto.metrics.v1.NumberDataPoint\n */\nexport type NumberDataPoint = Message<\"opentelemetry.proto.metrics.v1.NumberDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * The value itself. A point is considered invalid when one of the recognized\n * value fields is not present inside this oneof.\n *\n * @generated from oneof opentelemetry.proto.metrics.v1.NumberDataPoint.value\n */\n value: {\n /**\n * @generated from field: double as_double = 4;\n */\n value: number;\n case: \"asDouble\";\n } | {\n /**\n * @generated from field: sfixed64 as_int = 6;\n */\n value: bigint;\n case: \"asInt\";\n } | { case: undefined; value?: undefined };\n\n /**\n * (Optional) List of exemplars collected from\n * measurements that were used to form the data point\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;\n */\n exemplars: Exemplar[];\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 8;\n */\n flags: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.NumberDataPoint.\n * Use `create(NumberDataPointSchema)` to create a new message.\n */\nexport const NumberDataPointSchema: GenMessage<NumberDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 9);\n\n/**\n * HistogramDataPoint is a single data point in a timeseries that describes the\n * time-varying values of a Histogram. A Histogram contains summary statistics\n * for a population of values, it may optionally contain the distribution of\n * those values across a set of buckets.\n *\n * If the histogram contains the distribution of values, then both\n * \"explicit_bounds\" and \"bucket counts\" fields must be defined.\n * If the histogram does not contain the distribution of values, then both\n * \"explicit_bounds\" and \"bucket_counts\" must be omitted and only \"count\" and\n * \"sum\" are known.\n *\n * @generated from message opentelemetry.proto.metrics.v1.HistogramDataPoint\n */\nexport type HistogramDataPoint = Message<\"opentelemetry.proto.metrics.v1.HistogramDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * count is the number of values in the population. Must be non-negative. This\n * value must be equal to the sum of the \"count\" fields in buckets if a\n * histogram is provided.\n *\n * @generated from field: fixed64 count = 4;\n */\n count: bigint;\n\n /**\n * sum of the values in the population. If count is zero then this field\n * must be zero.\n *\n * Note: Sum should only be filled out when measuring non-negative discrete\n * events, and is assumed to be monotonic over the values of these events.\n * Negative events *can* be recorded, but sum should not be filled out when\n * doing so. This is specifically to enforce compatibility w/ OpenMetrics,\n * see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram\n *\n * @generated from field: optional double sum = 5;\n */\n sum?: number;\n\n /**\n * bucket_counts is an optional field contains the count values of histogram\n * for each bucket.\n *\n * The sum of the bucket_counts must equal the value in the count field.\n *\n * The number of elements in bucket_counts array must be by one greater than\n * the number of elements in explicit_bounds array. The exception to this rule\n * is when the length of bucket_counts is 0, then the length of explicit_bounds\n * must also be 0.\n *\n * @generated from field: repeated fixed64 bucket_counts = 6;\n */\n bucketCounts: bigint[];\n\n /**\n * explicit_bounds specifies buckets with explicitly defined bounds for values.\n *\n * The boundaries for bucket at index i are:\n *\n * (-infinity, explicit_bounds[i]] for i == 0\n * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)\n * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)\n *\n * The values in the explicit_bounds array must be strictly increasing.\n *\n * Histogram buckets are inclusive of their upper boundary, except the last\n * bucket where the boundary is at infinity. This format is intentionally\n * compatible with the OpenMetrics histogram definition.\n *\n * If bucket_counts length is 0 then explicit_bounds length must also be 0,\n * otherwise the data point is invalid.\n *\n * @generated from field: repeated double explicit_bounds = 7;\n */\n explicitBounds: number[];\n\n /**\n * (Optional) List of exemplars collected from\n * measurements that were used to form the data point\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;\n */\n exemplars: Exemplar[];\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 10;\n */\n flags: number;\n\n /**\n * min is the minimum value over (start_time, end_time].\n *\n * @generated from field: optional double min = 11;\n */\n min?: number;\n\n /**\n * max is the maximum value over (start_time, end_time].\n *\n * @generated from field: optional double max = 12;\n */\n max?: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.HistogramDataPoint.\n * Use `create(HistogramDataPointSchema)` to create a new message.\n */\nexport const HistogramDataPointSchema: GenMessage<HistogramDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 10);\n\n/**\n * ExponentialHistogramDataPoint is a single data point in a timeseries that describes the\n * time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains\n * summary statistics for a population of values, it may optionally contain the\n * distribution of those values across a set of buckets.\n *\n *\n * @generated from message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n */\nexport type ExponentialHistogramDataPoint = Message<\"opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * The number of values in the population. Must be\n * non-negative. This value must be equal to the sum of the \"bucket_counts\"\n * values in the positive and negative Buckets plus the \"zero_count\" field.\n *\n * @generated from field: fixed64 count = 4;\n */\n count: bigint;\n\n /**\n * The sum of the values in the population. If count is zero then this field\n * must be zero.\n *\n * Note: Sum should only be filled out when measuring non-negative discrete\n * events, and is assumed to be monotonic over the values of these events.\n * Negative events *can* be recorded, but sum should not be filled out when\n * doing so. This is specifically to enforce compatibility w/ OpenMetrics,\n * see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram\n *\n * @generated from field: optional double sum = 5;\n */\n sum?: number;\n\n /**\n * scale describes the resolution of the histogram. Boundaries are\n * located at powers of the base, where:\n *\n * base = (2^(2^-scale))\n *\n * The histogram bucket identified by `index`, a signed integer,\n * contains values that are greater than (base^index) and\n * less than or equal to (base^(index+1)).\n *\n * The positive and negative ranges of the histogram are expressed\n * separately. Negative values are mapped by their absolute value\n * into the negative range using the same scale as the positive range.\n *\n * scale is not restricted by the protocol, as the permissible\n * values depend on the range of the data.\n *\n * @generated from field: sint32 scale = 6;\n */\n scale: number;\n\n /**\n * The count of values that are either exactly zero or\n * within the region considered zero by the instrumentation at the\n * tolerated degree of precision. This bucket stores values that\n * cannot be expressed using the standard exponential formula as\n * well as values that have been rounded to zero.\n *\n * Implementations MAY consider the zero bucket to have probability\n * mass equal to (zero_count / count).\n *\n * @generated from field: fixed64 zero_count = 7;\n */\n zeroCount: bigint;\n\n /**\n * positive carries the positive range of exponential bucket counts.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;\n */\n positive?: ExponentialHistogramDataPoint_Buckets;\n\n /**\n * negative carries the negative range of exponential bucket counts.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;\n */\n negative?: ExponentialHistogramDataPoint_Buckets;\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 10;\n */\n flags: number;\n\n /**\n * (Optional) List of exemplars collected from\n * measurements that were used to form the data point\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;\n */\n exemplars: Exemplar[];\n\n /**\n * The minimum value over (start_time, end_time].\n *\n * @generated from field: optional double min = 12;\n */\n min?: number;\n\n /**\n * The maximum value over (start_time, end_time].\n *\n * @generated from field: optional double max = 13;\n */\n max?: number;\n\n /**\n * ZeroThreshold may be optionally set to convey the width of the zero\n * region. Where the zero region is defined as the closed interval\n * [-ZeroThreshold, ZeroThreshold].\n * When ZeroThreshold is 0, zero count bucket stores values that cannot be\n * expressed using the standard exponential formula as well as values that\n * have been rounded to zero.\n *\n * @generated from field: double zero_threshold = 14;\n */\n zeroThreshold: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.\n * Use `create(ExponentialHistogramDataPointSchema)` to create a new message.\n */\nexport const ExponentialHistogramDataPointSchema: GenMessage<ExponentialHistogramDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 11);\n\n/**\n * Buckets are a set of bucket counts, encoded in a contiguous array\n * of counts.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n */\nexport type ExponentialHistogramDataPoint_Buckets = Message<\"opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\"> & {\n /**\n * The bucket index of the first entry in the bucket_counts array.\n *\n * Note: This uses a varint encoding as a simple form of compression.\n *\n * @generated from field: sint32 offset = 1;\n */\n offset: number;\n\n /**\n * An array of count values, where bucket_counts[i] carries\n * the count of the bucket at index (offset+i). bucket_counts[i] is the count\n * of values greater than base^(offset+i) and less than or equal to\n * base^(offset+i+1).\n *\n * Note: By contrast, the explicit HistogramDataPoint uses\n * fixed64. This field is expected to have many buckets,\n * especially zeros, so uint64 has been selected to ensure\n * varint encoding.\n *\n * @generated from field: repeated uint64 bucket_counts = 2;\n */\n bucketCounts: bigint[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.\n * Use `create(ExponentialHistogramDataPoint_BucketsSchema)` to create a new message.\n */\nexport const ExponentialHistogramDataPoint_BucketsSchema: GenMessage<ExponentialHistogramDataPoint_Buckets> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 11, 0);\n\n/**\n * SummaryDataPoint is a single data point in a timeseries that describes the\n * time-varying values of a Summary metric. The count and sum fields represent\n * cumulative values.\n *\n * @generated from message opentelemetry.proto.metrics.v1.SummaryDataPoint\n */\nexport type SummaryDataPoint = Message<\"opentelemetry.proto.metrics.v1.SummaryDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * count is the number of values in the population. Must be non-negative.\n *\n * @generated from field: fixed64 count = 4;\n */\n count: bigint;\n\n /**\n * sum of the values in the population. If count is zero then this field\n * must be zero.\n *\n * Note: Sum should only be filled out when measuring non-negative discrete\n * events, and is assumed to be monotonic over the values of these events.\n * Negative events *can* be recorded, but sum should not be filled out when\n * doing so. This is specifically to enforce compatibility w/ OpenMetrics,\n * see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary\n *\n * @generated from field: double sum = 5;\n */\n sum: number;\n\n /**\n * (Optional) list of values at different quantiles of the distribution calculated\n * from the current snapshot. The quantiles must be strictly increasing.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;\n */\n quantileValues: SummaryDataPoint_ValueAtQuantile[];\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 8;\n */\n flags: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.SummaryDataPoint.\n * Use `create(SummaryDataPointSchema)` to create a new message.\n */\nexport const SummaryDataPointSchema: GenMessage<SummaryDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 12);\n\n/**\n * Represents the value at a given quantile of a distribution.\n *\n * To record Min and Max values following conventions are used:\n * - The 1.0 quantile is equivalent to the maximum value observed.\n * - The 0.0 quantile is equivalent to the minimum value observed.\n *\n * See the following issue for more context:\n * https://github.com/open-telemetry/opentelemetry-proto/issues/125\n *\n * @generated from message opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n */\nexport type SummaryDataPoint_ValueAtQuantile = Message<\"opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\"> & {\n /**\n * The quantile of a distribution. Must be in the interval\n * [0.0, 1.0].\n *\n * @generated from field: double quantile = 1;\n */\n quantile: number;\n\n /**\n * The value at the given quantile of a distribution.\n *\n * Quantile values must NOT be negative.\n *\n * @generated from field: double value = 2;\n */\n value: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.\n * Use `create(SummaryDataPoint_ValueAtQuantileSchema)` to create a new message.\n */\nexport const SummaryDataPoint_ValueAtQuantileSchema: GenMessage<SummaryDataPoint_ValueAtQuantile> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 12, 0);\n\n/**\n * A representation of an exemplar, which is a sample input measurement.\n * Exemplars also hold information about the environment when the measurement\n * was recorded, for example the span and trace ID of the active span when the\n * exemplar was recorded.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Exemplar\n */\nexport type Exemplar = Message<\"opentelemetry.proto.metrics.v1.Exemplar\"> & {\n /**\n * The set of key/value pairs that were filtered out by the aggregator, but\n * recorded alongside the original measurement. Only key/value pairs that were\n * filtered out by the aggregator should be included\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;\n */\n filteredAttributes: KeyValue[];\n\n /**\n * time_unix_nano is the exact time when this exemplar was recorded\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 2;\n */\n timeUnixNano: bigint;\n\n /**\n * The value of the measurement that was recorded. An exemplar is\n * considered invalid when one of the recognized value fields is not present\n * inside this oneof.\n *\n * @generated from oneof opentelemetry.proto.metrics.v1.Exemplar.value\n */\n value: {\n /**\n * @generated from field: double as_double = 3;\n */\n value: number;\n case: \"asDouble\";\n } | {\n /**\n * @generated from field: sfixed64 as_int = 6;\n */\n value: bigint;\n case: \"asInt\";\n } | { case: undefined; value?: undefined };\n\n /**\n * (Optional) Span ID of the exemplar trace.\n * span_id may be missing if the measurement is not recorded inside a trace\n * or if the trace is not sampled.\n *\n * @generated from field: bytes span_id = 4;\n */\n spanId: Uint8Array;\n\n /**\n * (Optional) Trace ID of the exemplar trace.\n * trace_id may be missing if the measurement is not recorded inside a trace\n * or if the trace is not sampled.\n *\n * @generated from field: bytes trace_id = 5;\n */\n traceId: Uint8Array;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Exemplar.\n * Use `create(ExemplarSchema)` to create a new message.\n */\nexport const ExemplarSchema: GenMessage<Exemplar> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 13);\n\n/**\n * AggregationTemporality defines how a metric aggregator reports aggregated\n * values. It describes how those values relate to the time interval over\n * which they are aggregated.\n *\n * @generated from enum opentelemetry.proto.metrics.v1.AggregationTemporality\n */\nexport enum AggregationTemporality {\n /**\n * UNSPECIFIED is the default AggregationTemporality, it MUST not be used.\n *\n * @generated from enum value: AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * DELTA is an AggregationTemporality for a metric aggregator which reports\n * changes since last report time. Successive metrics contain aggregation of\n * values from continuous and non-overlapping intervals.\n *\n * The values for a DELTA metric are based only on the time interval\n * associated with one measurement cycle. There is no dependency on\n * previous measurements like is the case for CUMULATIVE metrics.\n *\n * For example, consider a system measuring the number of requests that\n * it receives and reports the sum of these requests every second as a\n * DELTA metric:\n *\n * 1. The system starts receiving at time=t_0.\n * 2. A request is received, the system measures 1 request.\n * 3. A request is received, the system measures 1 request.\n * 4. A request is received, the system measures 1 request.\n * 5. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0 to\n * t_0+1 with a value of 3.\n * 6. A request is received, the system measures 1 request.\n * 7. A request is received, the system measures 1 request.\n * 8. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0+1 to\n * t_0+2 with a value of 2.\n *\n * @generated from enum value: AGGREGATION_TEMPORALITY_DELTA = 1;\n */\n DELTA = 1,\n\n /**\n * CUMULATIVE is an AggregationTemporality for a metric aggregator which\n * reports changes since a fixed start time. This means that current values\n * of a CUMULATIVE metric depend on all previous measurements since the\n * start time. Because of this, the sender is required to retain this state\n * in some form. If this state is lost or invalidated, the CUMULATIVE metric\n * values MUST be reset and a new fixed start time following the last\n * reported measurement time sent MUST be used.\n *\n * For example, consider a system measuring the number of requests that\n * it receives and reports the sum of these requests every second as a\n * CUMULATIVE metric:\n *\n * 1. The system starts receiving at time=t_0.\n * 2. A request is received, the system measures 1 request.\n * 3. A request is received, the system measures 1 request.\n * 4. A request is received, the system measures 1 request.\n * 5. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0 to\n * t_0+1 with a value of 3.\n * 6. A request is received, the system measures 1 request.\n * 7. A request is received, the system measures 1 request.\n * 8. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0 to\n * t_0+2 with a value of 5.\n * 9. The system experiences a fault and loses state.\n * 10. The system recovers and resumes receiving at time=t_1.\n * 11. A request is received, the system measures 1 request.\n * 12. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_1 to\n * t_0+1 with a value of 1.\n *\n * Note: Even though, when reporting changes since last report time, using\n * CUMULATIVE is valid, it is not recommended. This may cause problems for\n * systems that do not use start_time to determine when the aggregation\n * value was reset (e.g. Prometheus).\n *\n * @generated from enum value: AGGREGATION_TEMPORALITY_CUMULATIVE = 2;\n */\n CUMULATIVE = 2,\n}\n\n/**\n * Describes the enum opentelemetry.proto.metrics.v1.AggregationTemporality.\n */\nexport const AggregationTemporalitySchema: GenEnum<AggregationTemporality> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_metrics_v1_metrics, 0);\n\n/**\n * DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a\n * bit-field representing 32 distinct boolean flags. Each flag defined in this\n * enum is a bit-mask. To test the presence of a single flag in the flags of\n * a data point, for example, use an expression like:\n *\n * (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK\n *\n *\n * @generated from enum opentelemetry.proto.metrics.v1.DataPointFlags\n */\nexport enum DataPointFlags {\n /**\n * The zero value for the enum. Should not be used for comparisons.\n * Instead use bitwise \"and\" with the appropriate mask as shown above.\n *\n * @generated from enum value: DATA_POINT_FLAGS_DO_NOT_USE = 0;\n */\n DO_NOT_USE = 0,\n\n /**\n * This DataPoint is valid but has no recorded value. This value\n * SHOULD be used to reflect explicitly missing data in a series, as\n * for an equivalent to the Prometheus \"staleness marker\".\n *\n * @generated from enum value: DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1;\n */\n NO_RECORDED_VALUE_MASK = 1,\n}\n\n/**\n * Describes the enum opentelemetry.proto.metrics.v1.DataPointFlags.\n */\nexport const DataPointFlagsSchema: GenEnum<DataPointFlags> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_metrics_v1_metrics, 1);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/collector/metrics/v1/metrics_service.proto (package opentelemetry.proto.collector.metrics.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { ResourceMetrics } from \"../../../metrics/v1/metrics_pb.js\";\nimport { file_opentelemetry_proto_metrics_v1_metrics } from \"../../../metrics/v1/metrics_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/collector/metrics/v1/metrics_service.proto.\n */\nexport const file_opentelemetry_proto_collector_metrics_v1_metrics_service: GenFile = /*@__PURE__*/\n fileDesc(\"Cj5vcGVudGVsZW1ldHJ5L3Byb3RvL2NvbGxlY3Rvci9tZXRyaWNzL3YxL21ldHJpY3Nfc2VydmljZS5wcm90bxIob3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubWV0cmljcy52MSJoChtFeHBvcnRNZXRyaWNzU2VydmljZVJlcXVlc3QSSQoQcmVzb3VyY2VfbWV0cmljcxgBIAMoCzIvLm9wZW50ZWxlbWV0cnkucHJvdG8ubWV0cmljcy52MS5SZXNvdXJjZU1ldHJpY3MifgocRXhwb3J0TWV0cmljc1NlcnZpY2VSZXNwb25zZRJeCg9wYXJ0aWFsX3N1Y2Nlc3MYASABKAsyRS5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci5tZXRyaWNzLnYxLkV4cG9ydE1ldHJpY3NQYXJ0aWFsU3VjY2VzcyJSChtFeHBvcnRNZXRyaWNzUGFydGlhbFN1Y2Nlc3MSHAoUcmVqZWN0ZWRfZGF0YV9wb2ludHMYASABKAMSFQoNZXJyb3JfbWVzc2FnZRgCIAEoCTKsAQoOTWV0cmljc1NlcnZpY2USmQEKBkV4cG9ydBJFLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLm1ldHJpY3MudjEuRXhwb3J0TWV0cmljc1NlcnZpY2VSZXF1ZXN0GkYub3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubWV0cmljcy52MS5FeHBvcnRNZXRyaWNzU2VydmljZVJlc3BvbnNlIgBCpAEKK2lvLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLm1ldHJpY3MudjFCE01ldHJpY3NTZXJ2aWNlUHJvdG9QAVozZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2NvbGxlY3Rvci9tZXRyaWNzL3YxqgIoT3BlblRlbGVtZXRyeS5Qcm90by5Db2xsZWN0b3IuTWV0cmljcy5WMWIGcHJvdG8z\", [file_opentelemetry_proto_metrics_v1_metrics]);\n\n/**\n * @generated from message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n */\nexport type ExportMetricsServiceRequest = Message<\"opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\"> & {\n /**\n * An array of ResourceMetrics.\n * For data coming from a single resource this array will typically contain one\n * element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n * data from multiple origins typically batch the data before forwarding further and\n * in that case this array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;\n */\n resourceMetrics: ResourceMetrics[];\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.\n * Use `create(ExportMetricsServiceRequestSchema)` to create a new message.\n */\nexport const ExportMetricsServiceRequestSchema: GenMessage<ExportMetricsServiceRequest> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 0);\n\n/**\n * @generated from message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n */\nexport type ExportMetricsServiceResponse = Message<\"opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"> & {\n /**\n * The details of a partially successful export request.\n *\n * If the request is only partially accepted\n * (i.e. when the server accepts only parts of the data and rejects the rest)\n * the server MUST initialize the `partial_success` field and MUST\n * set the `rejected_<signal>` with the number of items it rejected.\n *\n * Servers MAY also make use of the `partial_success` field to convey\n * warnings/suggestions to senders even when the request was fully accepted.\n * In such cases, the `rejected_<signal>` MUST have a value of `0` and\n * the `error_message` MUST be non-empty.\n *\n * A `partial_success` message with an empty value (rejected_<signal> = 0 and\n * `error_message` = \"\") is equivalent to it not being set/present. Senders\n * SHOULD interpret it the same way as in the full success case.\n *\n * @generated from field: opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;\n */\n partialSuccess?: ExportMetricsPartialSuccess;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.\n * Use `create(ExportMetricsServiceResponseSchema)` to create a new message.\n */\nexport const ExportMetricsServiceResponseSchema: GenMessage<ExportMetricsServiceResponse> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 1);\n\n/**\n * @generated from message opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n */\nexport type ExportMetricsPartialSuccess = Message<\"opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\"> & {\n /**\n * The number of rejected data points.\n *\n * A `rejected_<signal>` field holding a `0` value indicates that the\n * request was fully accepted.\n *\n * @generated from field: int64 rejected_data_points = 1;\n */\n rejectedDataPoints: bigint;\n\n /**\n * A developer-facing human-readable message in English. It should be used\n * either to explain why the server rejected parts of the data during a partial\n * success or to convey warnings/suggestions during a full success. The message\n * should offer guidance on how users can address such issues.\n *\n * error_message is an optional field. An error_message with an empty value\n * is equivalent to it not being set.\n *\n * @generated from field: string error_message = 2;\n */\n errorMessage: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.\n * Use `create(ExportMetricsPartialSuccessSchema)` to create a new message.\n */\nexport const ExportMetricsPartialSuccessSchema: GenMessage<ExportMetricsPartialSuccess> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 2);\n\n/**\n * Service that can be used to push metrics between one Application\n * instrumented with OpenTelemetry and a collector, or between a collector and a\n * central collector.\n *\n * @generated from service opentelemetry.proto.collector.metrics.v1.MetricsService\n */\nexport const MetricsService: GenService<{\n /**\n * @generated from rpc opentelemetry.proto.collector.metrics.v1.MetricsService.Export\n */\n export: {\n methodKind: \"unary\";\n input: typeof ExportMetricsServiceRequestSchema;\n output: typeof ExportMetricsServiceResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 0);\n\n","// Copyright 2020, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/logs/v1/logs.proto (package opentelemetry.proto.logs.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { AnyValue, InstrumentationScope, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Resource } from \"../../resource/v1/resource_pb.js\";\nimport { file_opentelemetry_proto_resource_v1_resource } from \"../../resource/v1/resource_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/logs/v1/logs.proto.\n */\nexport const file_opentelemetry_proto_logs_v1_logs: GenFile = /*@__PURE__*/\n fileDesc(\"CiZvcGVudGVsZW1ldHJ5L3Byb3RvL2xvZ3MvdjEvbG9ncy5wcm90bxIbb3BlbnRlbGVtZXRyeS5wcm90by5sb2dzLnYxIkwKCExvZ3NEYXRhEkAKDXJlc291cmNlX2xvZ3MYASADKAsyKS5vcGVudGVsZW1ldHJ5LnByb3RvLmxvZ3MudjEuUmVzb3VyY2VMb2dzIqMBCgxSZXNvdXJjZUxvZ3MSOwoIcmVzb3VyY2UYASABKAsyKS5vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxLlJlc291cmNlEjoKCnNjb3BlX2xvZ3MYAiADKAsyJi5vcGVudGVsZW1ldHJ5LnByb3RvLmxvZ3MudjEuU2NvcGVMb2dzEhIKCnNjaGVtYV91cmwYAyABKAlKBgjoBxDpByKgAQoJU2NvcGVMb2dzEkIKBXNjb3BlGAEgASgLMjMub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuSW5zdHJ1bWVudGF0aW9uU2NvcGUSOwoLbG9nX3JlY29yZHMYAiADKAsyJi5vcGVudGVsZW1ldHJ5LnByb3RvLmxvZ3MudjEuTG9nUmVjb3JkEhIKCnNjaGVtYV91cmwYAyABKAkigwMKCUxvZ1JlY29y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IQDhIZChVTRVZFUklUWV9OVU1CRVJfV0FSTjMQDxIZChVTRVZFUklUWV9OVU1CRVJfV0FSTjQQEBIZChVTRVZFUklUWV9OVU1CRVJfRVJST1IQERIaChZTRVZFUklUWV9OVU1CRVJfRVJST1IyEBISGgoWU0VWRVJJVFlfTlVNQkVSX0VSUk9SMxATEhoKFlNFVkVSSVRZX05VTUJFUl9FUlJPUjQQFBIZChVTRVZFUklUWV9OVU1CRVJfRkFUQUwQFRIaChZTRVZFUklUWV9OVU1CRVJfRkFUQUwyEBYSGgoWU0VWRVJJVFlfTlVNQkVSX0ZBVEFMMxAXEhoKFlNFVkVSSVRZX05VTUJFUl9GQVRBTDQQGCpZCg5Mb2dSZWNvcmRGbGFncxIfChtMT0dfUkVDT1JEX0ZMQUdTX0RPX05PVF9VU0UQABImCiFMT0dfUkVDT1JEX0ZMQUdTX1RSQUNFX0ZMQUdTX01BU0sQ/wFCcwoeaW8ub3BlbnRlbGVtZXRyeS5wcm90by5sb2dzLnYxQglMb2dzUHJvdG9QAVomZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2xvZ3MvdjGqAhtPcGVuVGVsZW1ldHJ5LlByb3RvLkxvZ3MuVjFiBnByb3RvMw\", [file_opentelemetry_proto_common_v1_common, file_opentelemetry_proto_resource_v1_resource]);\n\n/**\n * LogsData represents the logs data that can be stored in a persistent storage,\n * OR can be embedded by other protocols that transfer OTLP logs data but do not\n * implement the OTLP protocol.\n *\n * The main difference between this message and collector protocol is that\n * in this message there will not be any \"control\" or \"metadata\" specific to\n * OTLP protocol.\n *\n * When new fields are added into this message, the OTLP request MUST be updated\n * as well.\n *\n * @generated from message opentelemetry.proto.logs.v1.LogsData\n */\nexport type LogsData = Message<\"opentelemetry.proto.logs.v1.LogsData\"> & {\n /**\n * An array of ResourceLogs.\n * For data coming from a single resource this array will typically contain\n * one element. Intermediary nodes that receive data from multiple origins\n * typically batch the data before forwarding further and in that case this\n * array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;\n */\n resourceLogs: ResourceLogs[];\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.LogsData.\n * Use `create(LogsDataSchema)` to create a new message.\n */\nexport const LogsDataSchema: GenMessage<LogsData> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 0);\n\n/**\n * A collection of ScopeLogs from a Resource.\n *\n * @generated from message opentelemetry.proto.logs.v1.ResourceLogs\n */\nexport type ResourceLogs = Message<\"opentelemetry.proto.logs.v1.ResourceLogs\"> & {\n /**\n * The resource for the logs in this message.\n * If this field is not set then resource info is unknown.\n *\n * @generated from field: opentelemetry.proto.resource.v1.Resource resource = 1;\n */\n resource?: Resource;\n\n /**\n * A list of ScopeLogs that originate from a resource.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;\n */\n scopeLogs: ScopeLogs[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the resource data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"resource\" field. It does not apply\n * to the data in the \"scope_logs\" field which have their own schema_url field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.ResourceLogs.\n * Use `create(ResourceLogsSchema)` to create a new message.\n */\nexport const ResourceLogsSchema: GenMessage<ResourceLogs> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 1);\n\n/**\n * A collection of Logs produced by a Scope.\n *\n * @generated from message opentelemetry.proto.logs.v1.ScopeLogs\n */\nexport type ScopeLogs = Message<\"opentelemetry.proto.logs.v1.ScopeLogs\"> & {\n /**\n * The instrumentation scope information for the logs in this message.\n * Semantically when InstrumentationScope isn't set, it is equivalent with\n * an empty instrumentation scope name (unknown).\n *\n * @generated from field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1;\n */\n scope?: InstrumentationScope;\n\n /**\n * A list of log records.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.LogRecord log_records = 2;\n */\n logRecords: LogRecord[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the log data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"scope\" field and all logs in the\n * \"log_records\" field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.ScopeLogs.\n * Use `create(ScopeLogsSchema)` to create a new message.\n */\nexport const ScopeLogsSchema: GenMessage<ScopeLogs> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 2);\n\n/**\n * A log record according to OpenTelemetry Log Data Model:\n * https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md\n *\n * @generated from message opentelemetry.proto.logs.v1.LogRecord\n */\nexport type LogRecord = Message<\"opentelemetry.proto.logs.v1.LogRecord\"> & {\n /**\n * time_unix_nano is the time when the event occurred.\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n * Value of 0 indicates unknown or missing timestamp.\n *\n * @generated from field: fixed64 time_unix_nano = 1;\n */\n timeUnixNano: bigint;\n\n /**\n * Time when the event was observed by the collection system.\n * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)\n * this timestamp is typically set at the generation time and is equal to Timestamp.\n * For events originating externally and collected by OpenTelemetry (e.g. using\n * Collector) this is the time when OpenTelemetry's code observed the event measured\n * by the clock of the OpenTelemetry code. This field MUST be set once the event is\n * observed by OpenTelemetry.\n *\n * For converting OpenTelemetry log data to formats that support only one timestamp or\n * when receiving OpenTelemetry log data by recipients that support only one timestamp\n * internally the following logic is recommended:\n * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n * Value of 0 indicates unknown or missing timestamp.\n *\n * @generated from field: fixed64 observed_time_unix_nano = 11;\n */\n observedTimeUnixNano: bigint;\n\n /**\n * Numerical value of the severity, normalized to values described in Log Data Model.\n * [Optional].\n *\n * @generated from field: opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;\n */\n severityNumber: SeverityNumber;\n\n /**\n * The severity text (also known as log level). The original string representation as\n * it is known at the source. [Optional].\n *\n * @generated from field: string severity_text = 3;\n */\n severityText: string;\n\n /**\n * A value containing the body of the log record. Can be for example a human-readable\n * string message (including multi-line) describing the event in a free form or it can\n * be a structured data composed of arrays and maps of other values. [Optional].\n *\n * @generated from field: opentelemetry.proto.common.v1.AnyValue body = 5;\n */\n body?: AnyValue;\n\n /**\n * Additional attributes that describe the specific event occurrence. [Optional].\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 6;\n */\n attributes: KeyValue[];\n\n /**\n * @generated from field: uint32 dropped_attributes_count = 7;\n */\n droppedAttributesCount: number;\n\n /**\n * Flags, a bit field. 8 least significant bits are the trace flags as\n * defined in W3C Trace Context specification. 24 most significant bits are reserved\n * and must be set to 0. Readers must not assume that 24 most significant bits\n * will be zero and must correctly mask the bits when reading 8-bit trace flag (use\n * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].\n *\n * @generated from field: fixed32 flags = 8;\n */\n flags: number;\n\n /**\n * A unique identifier for a trace. All logs from the same trace share\n * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\n * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is optional.\n *\n * The receivers SHOULD assume that the log record is not associated with a\n * trace if any of the following is true:\n * - the field is not present,\n * - the field contains an invalid value.\n *\n * @generated from field: bytes trace_id = 9;\n */\n traceId: Uint8Array;\n\n /**\n * A unique identifier for a span within a trace, assigned when the span\n * is created. The ID is an 8-byte array. An ID with all zeroes OR of length\n * other than 8 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is optional. If the sender specifies a valid span_id then it SHOULD also\n * specify a valid trace_id.\n *\n * The receivers SHOULD assume that the log record is not associated with a\n * span if any of the following is true:\n * - the field is not present,\n * - the field contains an invalid value.\n *\n * @generated from field: bytes span_id = 10;\n */\n spanId: Uint8Array;\n\n /**\n * A unique identifier of event category/type.\n * All events with the same event_name are expected to conform to the same\n * schema for both their attributes and their body.\n *\n * Recommended to be fully qualified and short (no longer than 256 characters).\n *\n * Presence of event_name on the log record identifies this record\n * as an event.\n *\n * [Optional].\n *\n * @generated from field: string event_name = 12;\n */\n eventName: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.LogRecord.\n * Use `create(LogRecordSchema)` to create a new message.\n */\nexport const LogRecordSchema: GenMessage<LogRecord> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 3);\n\n/**\n * Possible values for LogRecord.SeverityNumber.\n *\n * @generated from enum opentelemetry.proto.logs.v1.SeverityNumber\n */\nexport enum SeverityNumber {\n /**\n * UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.\n *\n * @generated from enum value: SEVERITY_NUMBER_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE = 1;\n */\n TRACE = 1,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE2 = 2;\n */\n TRACE2 = 2,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE3 = 3;\n */\n TRACE3 = 3,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE4 = 4;\n */\n TRACE4 = 4,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG = 5;\n */\n DEBUG = 5,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG2 = 6;\n */\n DEBUG2 = 6,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG3 = 7;\n */\n DEBUG3 = 7,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG4 = 8;\n */\n DEBUG4 = 8,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO = 9;\n */\n INFO = 9,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO2 = 10;\n */\n INFO2 = 10,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO3 = 11;\n */\n INFO3 = 11,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO4 = 12;\n */\n INFO4 = 12,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN = 13;\n */\n WARN = 13,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN2 = 14;\n */\n WARN2 = 14,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN3 = 15;\n */\n WARN3 = 15,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN4 = 16;\n */\n WARN4 = 16,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR = 17;\n */\n ERROR = 17,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR2 = 18;\n */\n ERROR2 = 18,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR3 = 19;\n */\n ERROR3 = 19,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR4 = 20;\n */\n ERROR4 = 20,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL = 21;\n */\n FATAL = 21,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL2 = 22;\n */\n FATAL2 = 22,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL3 = 23;\n */\n FATAL3 = 23,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL4 = 24;\n */\n FATAL4 = 24,\n}\n\n/**\n * Describes the enum opentelemetry.proto.logs.v1.SeverityNumber.\n */\nexport const SeverityNumberSchema: GenEnum<SeverityNumber> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_logs_v1_logs, 0);\n\n/**\n * LogRecordFlags represents constants used to interpret the\n * LogRecord.flags field, which is protobuf 'fixed32' type and is to\n * be used as bit-fields. Each non-zero value defined in this enum is\n * a bit-mask. To extract the bit-field, for example, use an\n * expression like:\n *\n * (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)\n *\n *\n * @generated from enum opentelemetry.proto.logs.v1.LogRecordFlags\n */\nexport enum LogRecordFlags {\n /**\n * The zero value for the enum. Should not be used for comparisons.\n * Instead use bitwise \"and\" with the appropriate mask as shown above.\n *\n * @generated from enum value: LOG_RECORD_FLAGS_DO_NOT_USE = 0;\n */\n DO_NOT_USE = 0,\n\n /**\n * Bits 0-7 are used for trace flags.\n *\n * @generated from enum value: LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;\n */\n TRACE_FLAGS_MASK = 255,\n}\n\n/**\n * Describes the enum opentelemetry.proto.logs.v1.LogRecordFlags.\n */\nexport const LogRecordFlagsSchema: GenEnum<LogRecordFlags> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_logs_v1_logs, 1);\n\n","// Copyright 2020, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/collector/logs/v1/logs_service.proto (package opentelemetry.proto.collector.logs.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { ResourceLogs } from \"../../../logs/v1/logs_pb.js\";\nimport { file_opentelemetry_proto_logs_v1_logs } from \"../../../logs/v1/logs_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/collector/logs/v1/logs_service.proto.\n */\nexport const file_opentelemetry_proto_collector_logs_v1_logs_service: GenFile = /*@__PURE__*/\n fileDesc(\"CjhvcGVudGVsZW1ldHJ5L3Byb3RvL2NvbGxlY3Rvci9sb2dzL3YxL2xvZ3Nfc2VydmljZS5wcm90bxIlb3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubG9ncy52MSJcChhFeHBvcnRMb2dzU2VydmljZVJlcXVlc3QSQAoNcmVzb3VyY2VfbG9ncxgBIAMoCzIpLm9wZW50ZWxlbWV0cnkucHJvdG8ubG9ncy52MS5SZXNvdXJjZUxvZ3MidQoZRXhwb3J0TG9nc1NlcnZpY2VSZXNwb25zZRJYCg9wYXJ0aWFsX3N1Y2Nlc3MYASABKAsyPy5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci5sb2dzLnYxLkV4cG9ydExvZ3NQYXJ0aWFsU3VjY2VzcyJPChhFeHBvcnRMb2dzUGFydGlhbFN1Y2Nlc3MSHAoUcmVqZWN0ZWRfbG9nX3JlY29yZHMYASABKAMSFQoNZXJyb3JfbWVzc2FnZRgCIAEoCTKdAQoLTG9nc1NlcnZpY2USjQEKBkV4cG9ydBI/Lm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLmxvZ3MudjEuRXhwb3J0TG9nc1NlcnZpY2VSZXF1ZXN0GkAub3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubG9ncy52MS5FeHBvcnRMb2dzU2VydmljZVJlc3BvbnNlIgBCmAEKKGlvLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLmxvZ3MudjFCEExvZ3NTZXJ2aWNlUHJvdG9QAVowZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2NvbGxlY3Rvci9sb2dzL3YxqgIlT3BlblRlbGVtZXRyeS5Qcm90by5Db2xsZWN0b3IuTG9ncy5WMWIGcHJvdG8z\", [file_opentelemetry_proto_logs_v1_logs]);\n\n/**\n * @generated from message opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n */\nexport type ExportLogsServiceRequest = Message<\"opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\"> & {\n /**\n * An array of ResourceLogs.\n * For data coming from a single resource this array will typically contain one\n * element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n * data from multiple origins typically batch the data before forwarding further and\n * in that case this array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;\n */\n resourceLogs: ResourceLogs[];\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.\n * Use `create(ExportLogsServiceRequestSchema)` to create a new message.\n */\nexport const ExportLogsServiceRequestSchema: GenMessage<ExportLogsServiceRequest> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 0);\n\n/**\n * @generated from message opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n */\nexport type ExportLogsServiceResponse = Message<\"opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\"> & {\n /**\n * The details of a partially successful export request.\n *\n * If the request is only partially accepted\n * (i.e. when the server accepts only parts of the data and rejects the rest)\n * the server MUST initialize the `partial_success` field and MUST\n * set the `rejected_<signal>` with the number of items it rejected.\n *\n * Servers MAY also make use of the `partial_success` field to convey\n * warnings/suggestions to senders even when the request was fully accepted.\n * In such cases, the `rejected_<signal>` MUST have a value of `0` and\n * the `error_message` MUST be non-empty.\n *\n * A `partial_success` message with an empty value (rejected_<signal> = 0 and\n * `error_message` = \"\") is equivalent to it not being set/present. Senders\n * SHOULD interpret it the same way as in the full success case.\n *\n * @generated from field: opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;\n */\n partialSuccess?: ExportLogsPartialSuccess;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.\n * Use `create(ExportLogsServiceResponseSchema)` to create a new message.\n */\nexport const ExportLogsServiceResponseSchema: GenMessage<ExportLogsServiceResponse> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 1);\n\n/**\n * @generated from message opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n */\nexport type ExportLogsPartialSuccess = Message<\"opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\"> & {\n /**\n * The number of rejected log records.\n *\n * A `rejected_<signal>` field holding a `0` value indicates that the\n * request was fully accepted.\n *\n * @generated from field: int64 rejected_log_records = 1;\n */\n rejectedLogRecords: bigint;\n\n /**\n * A developer-facing human-readable message in English. It should be used\n * either to explain why the server rejected parts of the data during a partial\n * success or to convey warnings/suggestions during a full success. The message\n * should offer guidance on how users can address such issues.\n *\n * error_message is an optional field. An error_message with an empty value\n * is equivalent to it not being set.\n *\n * @generated from field: string error_message = 2;\n */\n errorMessage: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.\n * Use `create(ExportLogsPartialSuccessSchema)` to create a new message.\n */\nexport const ExportLogsPartialSuccessSchema: GenMessage<ExportLogsPartialSuccess> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 2);\n\n/**\n * Service that can be used to push logs between one Application instrumented with\n * OpenTelemetry and an collector, or between an collector and a central collector (in this\n * case logs are sent/received to/from multiple Applications).\n *\n * @generated from service opentelemetry.proto.collector.logs.v1.LogsService\n */\nexport const LogsService: GenService<{\n /**\n * @generated from rpc opentelemetry.proto.collector.logs.v1.LogsService.Export\n */\n export: {\n methodKind: \"unary\";\n input: typeof ExportLogsServiceRequestSchema;\n output: typeof ExportLogsServiceResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 0);\n\n","import { fromBinary, toBinary, create } from \"@bufbuild/protobuf\";\nimport type { otlp, otlpMetrics } from \"@kopai/core\";\nimport {\n ExportTraceServiceRequestSchema,\n ExportTraceServiceResponseSchema,\n} from \"../gen/opentelemetry/proto/collector/trace/v1/trace_service_pb.js\";\nimport {\n ExportMetricsServiceRequestSchema,\n ExportMetricsServiceResponseSchema,\n} from \"../gen/opentelemetry/proto/collector/metrics/v1/metrics_service_pb.js\";\nimport {\n ExportLogsServiceRequestSchema,\n ExportLogsServiceResponseSchema,\n} from \"../gen/opentelemetry/proto/collector/logs/v1/logs_service_pb.js\";\nimport type {\n ResourceSpans,\n Span,\n Span_Event,\n Span_Link,\n Status,\n ScopeSpans,\n} from \"../gen/opentelemetry/proto/trace/v1/trace_pb.js\";\nimport type {\n ResourceMetrics,\n ScopeMetrics,\n Metric,\n NumberDataPoint,\n HistogramDataPoint,\n ExponentialHistogramDataPoint,\n SummaryDataPoint,\n Exemplar,\n} from \"../gen/opentelemetry/proto/metrics/v1/metrics_pb.js\";\nimport type {\n ResourceLogs,\n ScopeLogs,\n LogRecord,\n} from \"../gen/opentelemetry/proto/logs/v1/logs_pb.js\";\nimport type { Resource } from \"../gen/opentelemetry/proto/resource/v1/resource_pb.js\";\nimport type {\n AnyValue,\n KeyValue,\n InstrumentationScope,\n} from \"../gen/opentelemetry/proto/common/v1/common_pb.js\";\n\n// Utility functions for converting between protobuf binary types and JSON types\n\nfunction bytesToHex(bytes: Uint8Array): string {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n\nfunction bigintToString(value: bigint): string {\n return value.toString();\n}\n\nfunction stringToBigint(value: string | undefined): bigint {\n return value ? BigInt(value) : 0n;\n}\n\n// Convert AnyValue from protobuf to JSON format\nfunction convertAnyValue(\n value: AnyValue | undefined\n): otlp.AnyValue | undefined {\n if (!value || value.value.case === undefined) {\n return undefined;\n }\n\n switch (value.value.case) {\n case \"stringValue\":\n return { stringValue: value.value.value };\n case \"boolValue\":\n return { boolValue: value.value.value };\n case \"intValue\":\n return { intValue: bigintToString(value.value.value) };\n case \"doubleValue\":\n return { doubleValue: value.value.value };\n case \"bytesValue\":\n return { bytesValue: bytesToHex(value.value.value) };\n case \"arrayValue\":\n return {\n arrayValue: {\n values: value.value.value.values\n .map(convertAnyValue)\n .filter(Boolean) as otlp.AnyValue[],\n },\n };\n case \"kvlistValue\":\n return {\n kvlistValue: {\n values: value.value.value.values.map(convertKeyValue),\n },\n };\n default:\n return undefined;\n }\n}\n\n// Convert KeyValue from protobuf to JSON format\nfunction convertKeyValue(kv: KeyValue): otlp.KeyValue {\n return {\n key: kv.key,\n value: convertAnyValue(kv.value),\n };\n}\n\n// Convert InstrumentationScope from protobuf to JSON format\nfunction convertInstrumentationScope(\n scope: InstrumentationScope | undefined\n): otlp.InstrumentationScope | undefined {\n if (!scope) return undefined;\n return {\n name: scope.name || undefined,\n version: scope.version || undefined,\n attributes:\n scope.attributes.length > 0\n ? scope.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: scope.droppedAttributesCount || undefined,\n };\n}\n\n// Convert Resource from protobuf to JSON format\nfunction convertResource(\n resource: Resource | undefined\n): otlp.Resource | undefined {\n if (!resource) return undefined;\n return {\n attributes:\n resource.attributes.length > 0\n ? resource.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: resource.droppedAttributesCount || undefined,\n };\n}\n\n// === TRACES CONVERSION ===\n\nfunction convertStatus(status: Status | undefined): otlp.Status | undefined {\n if (!status) return undefined;\n return {\n code: status.code as number,\n message: status.message || undefined,\n };\n}\n\nfunction convertSpanEvent(event: Span_Event): otlp.Span_Event {\n return {\n timeUnixNano: bigintToString(event.timeUnixNano),\n name: event.name || undefined,\n attributes:\n event.attributes.length > 0\n ? event.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: event.droppedAttributesCount || undefined,\n };\n}\n\nfunction convertSpanLink(link: Span_Link): otlp.Span_Link {\n return {\n traceId: bytesToHex(link.traceId),\n spanId: bytesToHex(link.spanId),\n traceState: link.traceState || undefined,\n attributes:\n link.attributes.length > 0\n ? link.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: link.droppedAttributesCount || undefined,\n flags: link.flags || undefined,\n };\n}\n\nfunction convertSpan(span: Span): otlp.Span {\n return {\n traceId: bytesToHex(span.traceId),\n spanId: bytesToHex(span.spanId),\n traceState: span.traceState || undefined,\n parentSpanId:\n span.parentSpanId.length > 0 ? bytesToHex(span.parentSpanId) : undefined,\n flags: span.flags || undefined,\n name: span.name || undefined,\n kind: span.kind as number,\n startTimeUnixNano: bigintToString(span.startTimeUnixNano),\n endTimeUnixNano: bigintToString(span.endTimeUnixNano),\n attributes:\n span.attributes.length > 0\n ? span.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: span.droppedAttributesCount || undefined,\n events:\n span.events.length > 0 ? span.events.map(convertSpanEvent) : undefined,\n droppedEventsCount: span.droppedEventsCount || undefined,\n links: span.links.length > 0 ? span.links.map(convertSpanLink) : undefined,\n droppedLinksCount: span.droppedLinksCount || undefined,\n status: convertStatus(span.status),\n };\n}\n\nfunction convertScopeSpans(scopeSpans: ScopeSpans): otlp.ScopeSpans {\n return {\n scope: convertInstrumentationScope(scopeSpans.scope),\n spans:\n scopeSpans.spans.length > 0\n ? scopeSpans.spans.map(convertSpan)\n : undefined,\n schemaUrl: scopeSpans.schemaUrl || undefined,\n };\n}\n\nfunction convertResourceSpans(rs: ResourceSpans): otlp.ResourceSpans {\n return {\n resource: convertResource(rs.resource),\n scopeSpans:\n rs.scopeSpans.length > 0\n ? rs.scopeSpans.map(convertScopeSpans)\n : undefined,\n schemaUrl: rs.schemaUrl || undefined,\n };\n}\n\n// === METRICS CONVERSION ===\n\nfunction convertExemplar(exemplar: Exemplar): otlpMetrics.Exemplar {\n return {\n filteredAttributes:\n exemplar.filteredAttributes.length > 0\n ? exemplar.filteredAttributes.map(convertKeyValue)\n : undefined,\n timeUnixNano: bigintToString(exemplar.timeUnixNano),\n asDouble:\n exemplar.value.case === \"asDouble\" ? exemplar.value.value : undefined,\n asInt:\n exemplar.value.case === \"asInt\"\n ? bigintToString(exemplar.value.value)\n : undefined,\n spanId:\n exemplar.spanId.length > 0 ? bytesToHex(exemplar.spanId) : undefined,\n traceId:\n exemplar.traceId.length > 0 ? bytesToHex(exemplar.traceId) : undefined,\n };\n}\n\nfunction convertNumberDataPoint(\n dp: NumberDataPoint\n): otlpMetrics.NumberDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n asDouble: dp.value.case === \"asDouble\" ? dp.value.value : undefined,\n asInt:\n dp.value.case === \"asInt\" ? bigintToString(dp.value.value) : undefined,\n exemplars:\n dp.exemplars.length > 0 ? dp.exemplars.map(convertExemplar) : undefined,\n flags: dp.flags || undefined,\n };\n}\n\nfunction convertHistogramDataPoint(\n dp: HistogramDataPoint\n): otlpMetrics.HistogramDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n count: bigintToString(dp.count),\n sum: dp.sum,\n bucketCounts: dp.bucketCounts.map((v) => Number(v)),\n explicitBounds:\n dp.explicitBounds.length > 0 ? [...dp.explicitBounds] : undefined,\n exemplars:\n dp.exemplars.length > 0 ? dp.exemplars.map(convertExemplar) : undefined,\n flags: dp.flags || undefined,\n min: dp.min,\n max: dp.max,\n };\n}\n\nfunction convertExponentialHistogramDataPoint(\n dp: ExponentialHistogramDataPoint\n): otlpMetrics.ExponentialHistogramDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n count: bigintToString(dp.count),\n sum: dp.sum,\n scale: dp.scale,\n zeroCount: bigintToString(dp.zeroCount),\n positive: dp.positive\n ? {\n offset: dp.positive.offset,\n bucketCounts: dp.positive.bucketCounts.map((v) => Number(v)),\n }\n : undefined,\n negative: dp.negative\n ? {\n offset: dp.negative.offset,\n bucketCounts: dp.negative.bucketCounts.map((v) => Number(v)),\n }\n : undefined,\n flags: dp.flags || undefined,\n exemplars:\n dp.exemplars.length > 0 ? dp.exemplars.map(convertExemplar) : undefined,\n min: dp.min,\n max: dp.max,\n zeroThreshold: dp.zeroThreshold,\n };\n}\n\nfunction convertSummaryDataPoint(\n dp: SummaryDataPoint\n): otlpMetrics.SummaryDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n count: bigintToString(dp.count),\n sum: dp.sum,\n quantileValues:\n dp.quantileValues.length > 0\n ? dp.quantileValues.map((qv) => ({\n quantile: qv.quantile,\n value: qv.value,\n }))\n : undefined,\n flags: dp.flags || undefined,\n };\n}\n\nfunction convertMetric(metric: Metric): otlpMetrics.Metric {\n const base: otlpMetrics.Metric = {\n name: metric.name || undefined,\n description: metric.description || undefined,\n unit: metric.unit || undefined,\n metadata:\n metric.metadata.length > 0\n ? metric.metadata.map(convertKeyValue)\n : undefined,\n };\n\n switch (metric.data.case) {\n case \"gauge\":\n return {\n ...base,\n gauge: {\n dataPoints: metric.data.value.dataPoints.map(convertNumberDataPoint),\n },\n };\n case \"sum\":\n return {\n ...base,\n sum: {\n dataPoints: metric.data.value.dataPoints.map(convertNumberDataPoint),\n aggregationTemporality: metric.data.value\n .aggregationTemporality as number,\n isMonotonic: metric.data.value.isMonotonic,\n },\n };\n case \"histogram\":\n return {\n ...base,\n histogram: {\n dataPoints: metric.data.value.dataPoints.map(\n convertHistogramDataPoint\n ),\n aggregationTemporality: metric.data.value\n .aggregationTemporality as number,\n },\n };\n case \"exponentialHistogram\":\n return {\n ...base,\n exponentialHistogram: {\n dataPoints: metric.data.value.dataPoints.map(\n convertExponentialHistogramDataPoint\n ),\n aggregationTemporality: metric.data.value\n .aggregationTemporality as number,\n },\n };\n case \"summary\":\n return {\n ...base,\n summary: {\n dataPoints: metric.data.value.dataPoints.map(convertSummaryDataPoint),\n },\n };\n default:\n return base;\n }\n}\n\nfunction convertScopeMetrics(sm: ScopeMetrics): otlpMetrics.ScopeMetrics {\n return {\n scope: convertInstrumentationScope(sm.scope),\n metrics: sm.metrics.length > 0 ? sm.metrics.map(convertMetric) : undefined,\n schemaUrl: sm.schemaUrl || undefined,\n };\n}\n\nfunction convertResourceMetrics(\n rm: ResourceMetrics\n): otlpMetrics.ResourceMetrics {\n return {\n resource: convertResource(rm.resource),\n scopeMetrics:\n rm.scopeMetrics.length > 0\n ? rm.scopeMetrics.map(convertScopeMetrics)\n : undefined,\n schemaUrl: rm.schemaUrl || undefined,\n };\n}\n\n// === LOGS CONVERSION ===\n\nfunction convertLogRecord(log: LogRecord): otlp.LogRecord {\n return {\n timeUnixNano: bigintToString(log.timeUnixNano),\n observedTimeUnixNano: bigintToString(log.observedTimeUnixNano),\n severityNumber: log.severityNumber as number,\n severityText: log.severityText || undefined,\n body: convertAnyValue(log.body),\n attributes:\n log.attributes.length > 0\n ? log.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: log.droppedAttributesCount || undefined,\n flags: log.flags || undefined,\n traceId: log.traceId.length > 0 ? bytesToHex(log.traceId) : undefined,\n spanId: log.spanId.length > 0 ? bytesToHex(log.spanId) : undefined,\n };\n}\n\nfunction convertScopeLogs(sl: ScopeLogs): otlp.ScopeLogs {\n return {\n scope: convertInstrumentationScope(sl.scope),\n logRecords:\n sl.logRecords.length > 0\n ? sl.logRecords.map(convertLogRecord)\n : undefined,\n schemaUrl: sl.schemaUrl || undefined,\n };\n}\n\nfunction convertResourceLogs(rl: ResourceLogs): otlp.ResourceLogs {\n return {\n resource: convertResource(rl.resource),\n scopeLogs:\n rl.scopeLogs.length > 0 ? rl.scopeLogs.map(convertScopeLogs) : undefined,\n schemaUrl: rl.schemaUrl || undefined,\n };\n}\n\n// === MAIN DECODE FUNCTIONS ===\n\nexport function decodeTracesRequest(buffer: Uint8Array): otlp.TracesData {\n const request = fromBinary(ExportTraceServiceRequestSchema, buffer);\n return {\n resourceSpans: request.resourceSpans.map(convertResourceSpans),\n };\n}\n\nexport function decodeMetricsRequest(\n buffer: Uint8Array\n): otlpMetrics.MetricsData {\n const request = fromBinary(ExportMetricsServiceRequestSchema, buffer);\n return {\n resourceMetrics: request.resourceMetrics.map(convertResourceMetrics),\n };\n}\n\nexport function decodeLogsRequest(buffer: Uint8Array): otlp.LogsData {\n const request = fromBinary(ExportLogsServiceRequestSchema, buffer);\n return {\n resourceLogs: request.resourceLogs.map(convertResourceLogs),\n };\n}\n\n// === RESPONSE ENCODING ===\n\nexport function encodeTracesResponse(response: {\n rejectedSpans?: string;\n errorMessage?: string;\n}): Uint8Array {\n const msg = create(ExportTraceServiceResponseSchema, {\n partialSuccess: {\n rejectedSpans: stringToBigint(response.rejectedSpans),\n errorMessage: response.errorMessage ?? \"\",\n },\n });\n return toBinary(ExportTraceServiceResponseSchema, msg);\n}\n\nexport function encodeMetricsResponse(response: {\n rejectedDataPoints?: string;\n errorMessage?: string;\n}): Uint8Array {\n const msg = create(ExportMetricsServiceResponseSchema, {\n partialSuccess: {\n rejectedDataPoints: stringToBigint(response.rejectedDataPoints),\n errorMessage: response.errorMessage ?? \"\",\n },\n });\n return toBinary(ExportMetricsServiceResponseSchema, msg);\n}\n\nexport function encodeLogsResponse(response: {\n rejectedLogRecords?: string;\n errorMessage?: string;\n}): Uint8Array {\n const msg = create(ExportLogsServiceResponseSchema, {\n partialSuccess: {\n rejectedLogRecords: stringToBigint(response.rejectedLogRecords),\n errorMessage: response.errorMessage ?? \"\",\n },\n });\n return toBinary(ExportLogsServiceResponseSchema, msg);\n}\n\nexport {\n ExportTraceServiceRequestSchema,\n ExportMetricsServiceRequestSchema,\n ExportLogsServiceRequestSchema,\n};\n","import type { FastifyPluginAsync, FastifyRequest, FastifyReply } from \"fastify\";\nimport fp from \"fastify-plugin\";\nimport {\n decodeTracesRequest,\n decodeMetricsRequest,\n decodeLogsRequest,\n encodeTracesResponse,\n encodeMetricsResponse,\n encodeLogsResponse,\n} from \"./converter.js\";\n\nconst PROTOBUF_CONTENT_TYPE = \"application/x-protobuf\";\n\n// Store original content-type on request for response serialization\ndeclare module \"fastify\" {\n interface FastifyRequest {\n originalContentType?: string;\n }\n}\n\n/**\n * Fastify plugin that adds OTLP/HTTP protobuf support.\n *\n * Per OTLP spec, the response Content-Type must match the request Content-Type.\n * This plugin:\n * 1. Adds a content-type parser for application/x-protobuf\n * 2. Decodes protobuf binary to JSON objects (with bytes→hex conversion)\n * 3. Encodes responses back to protobuf when the request was protobuf\n */\nconst protobufPluginImpl: FastifyPluginAsync = async (fastify) => {\n // Store original content-type before any processing\n fastify.addHook(\"preHandler\", async (request: FastifyRequest) => {\n request.originalContentType =\n request.headers[\"content-type\"]?.split(\";\")[0];\n });\n\n // Add protobuf content-type parser\n fastify.addContentTypeParser(\n PROTOBUF_CONTENT_TYPE,\n { parseAs: \"buffer\" },\n (request: FastifyRequest, payload: Buffer, done) => {\n try {\n const url = request.url;\n const buffer = new Uint8Array(payload);\n\n if (url === \"/v1/traces\") {\n const decoded = decodeTracesRequest(buffer);\n done(null, decoded);\n } else if (url === \"/v1/metrics\") {\n const decoded = decodeMetricsRequest(buffer);\n done(null, decoded);\n } else if (url === \"/v1/logs\") {\n const decoded = decodeLogsRequest(buffer);\n done(null, decoded);\n } else {\n done(new Error(`Unknown OTLP endpoint: ${url}`), undefined);\n }\n } catch (err) {\n request.log.error(err, \"Failed to decode protobuf payload\");\n done(err as Error, undefined);\n }\n }\n );\n\n // Override response serializer to encode protobuf when needed\n // Use onSend hook which runs after serialization, allowing us to replace the payload\n fastify.addHook(\n \"onSend\",\n async (request: FastifyRequest, reply: FastifyReply, payload: unknown) => {\n // Only handle protobuf requests\n if (request.originalContentType !== PROTOBUF_CONTENT_TYPE) {\n return payload;\n }\n\n // Parse the JSON payload that was serialized by Fastify\n let data: {\n partialSuccess?: {\n rejectedSpans?: string;\n rejectedDataPoints?: string;\n rejectedLogRecords?: string;\n errorMessage?: string;\n };\n };\n\n try {\n data = JSON.parse(payload as string);\n } catch (err) {\n request.log.warn(\n err,\n \"Failed to parse JSON payload in protobuf response\"\n );\n return payload;\n }\n\n // Set response content-type to match request (per OTLP spec)\n reply.header(\"content-type\", PROTOBUF_CONTENT_TYPE);\n\n const url = request.url;\n\n try {\n let encoded: Uint8Array;\n\n if (url === \"/v1/traces\") {\n encoded = encodeTracesResponse({\n rejectedSpans: data.partialSuccess?.rejectedSpans,\n errorMessage: data.partialSuccess?.errorMessage,\n });\n } else if (url === \"/v1/metrics\") {\n encoded = encodeMetricsResponse({\n rejectedDataPoints: data.partialSuccess?.rejectedDataPoints,\n errorMessage: data.partialSuccess?.errorMessage,\n });\n } else if (url === \"/v1/logs\") {\n encoded = encodeLogsResponse({\n rejectedLogRecords: data.partialSuccess?.rejectedLogRecords,\n errorMessage: data.partialSuccess?.errorMessage,\n });\n } else {\n return payload;\n }\n\n // Return buffer to be sent directly\n return Buffer.from(encoded);\n } catch (err) {\n request.log.warn(err, \"Failed to encode protobuf response\");\n return payload;\n }\n }\n );\n};\n\nexport const protobufPlugin = fp(protobufPluginImpl, {\n name: \"protobuf-plugin\",\n});\n\nexport { PROTOBUF_CONTENT_TYPE };\n","import type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport type { datasource } from \"@kopai/core\";\nimport {\n serializerCompiler,\n validatorCompiler,\n} from \"fastify-type-provider-zod\";\n\nimport { metricsRoute } from \"./routes/metrics.js\";\nimport { tracesRoute } from \"./routes/traces.js\";\nimport { logsRoute } from \"./routes/logs.js\";\nimport { collectorErrorHandler } from \"./routes/error-handler.js\";\nimport { protobufPlugin } from \"./protobuf/index.js\";\n\nexport const collectorRoutes: FastifyPluginAsyncZod<{\n telemetryDatasource: datasource.WriteTelemetryDatasource;\n}> = async function (fastify, opts) {\n fastify.setValidatorCompiler(validatorCompiler);\n fastify.setSerializerCompiler(serializerCompiler);\n fastify.setErrorHandler(collectorErrorHandler);\n\n // Register protobuf support (OTLP/HTTP with application/x-protobuf)\n fastify.register(protobufPlugin);\n\n fastify.register(metricsRoute, {\n writeMetricsDatasource: opts.telemetryDatasource,\n });\n\n fastify.register(tracesRoute, {\n writeTracesDatasource: opts.telemetryDatasource,\n });\n\n fastify.register(logsRoute, {\n writeLogsDatasource: opts.telemetryDatasource,\n });\n};\n"],"mappings":";;;;;;;;;AAKA,MAAM,qCAAqC,EAAE,OAAO,EAClD,gBAAgB,EACb,OAAO;CACN,oBAAoB,EAAE,QAAQ,CAAC,UAAU;CACzC,cAAc,EAAE,QAAQ,CAAC,UAAU;CACpC,CAAC,CACD,UAAU,EACd,CAAC;AAEF,MAAa,eAER,eAAgB,SAAS,MAAM;AAClC,SAAQ,MAAM;EACZ,QAAQ;EACR,KAAK;EACL,QAAQ;GACN,MAAM,eAAe;GACrB,UAAU,EACR,KAAK,oCACN;GACF;EACD,SAAS,OAAO,KAAK,QAAQ;GAC3B,MAAM,EAAE,oBAAoB,iBAC1B,MAAM,KAAK,uBAAuB,aAAa,IAAI,KAAK;AAE1D,OAAI,KAAK,EACP,gBAAgB;IACd;IACA;IACD,EACF,CAAC;;EAEL,CAAC;;;;;AChCJ,MAAM,oCAAoC,EAAE,OAAO,EACjD,gBAAgB,EACb,OAAO;CACN,eAAe,EAAE,QAAQ,CAAC,UAAU;CACpC,cAAc,EAAE,QAAQ,CAAC,UAAU;C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AC;YACO,QAAQ,cACjB,WAAU,sBAAsB;IAC9B,oBAAoB,KAAK,gBAAgB;IACzC,cAAc,KAAK,gBAAgB;IACpC,CAAC;YACO,QAAQ,WACjB,WAAU,mBAAmB;IAC3B,oBAAoB,KAAK,gBAAgB;IACzC,cAAc,KAAK,gBAAgB;IACpC,CAAC;OAEF,QAAO;AAIT,UAAO,OAAO,KAAK,QAAQ;WACpB,KAAK;AACZ,WAAQ,IAAI,KAAK,KAAK,qCAAqC;AAC3D,UAAO;;GAGZ;;AAGH,MAAa,iBAAiB,GAAG,oBAAoB,EACnD,MAAM,mBACP,CAAC;;;;ACxHF,MAAa,kBAER,eAAgB,SAAS,MAAM;AAClC,SAAQ,qBAAqB,kBAAkB;AAC/C,SAAQ,sBAAsB,mBAAmB;AACjD,SAAQ,gBAAgB,sBAAsB;AAG9C,SAAQ,SAAS,eAAe;AAEhC,SAAQ,SAAS,cAAc,EAC7B,wBAAwB,KAAK,qBAC9B,CAAC;AAEF,SAAQ,SAAS,aAAa,EAC5B,uBAAuB,KAAK,qBAC7B,CAAC;AAEF,SAAQ,SAAS,WAAW,EAC1B,qBAAqB,KAAK,qBAC3B,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/routes/metrics.ts","../src/routes/traces.ts","../src/routes/logs.ts","../src/routes/otlp-schemas.ts","../src/routes/field-violation.ts","../src/routes/errors.ts","../src/routes/error-handler.ts","../src/gen/opentelemetry/proto/common/v1/common_pb.ts","../src/gen/opentelemetry/proto/resource/v1/resource_pb.ts","../src/gen/opentelemetry/proto/trace/v1/trace_pb.ts","../src/gen/opentelemetry/proto/collector/trace/v1/trace_service_pb.ts","../src/gen/opentelemetry/proto/metrics/v1/metrics_pb.ts","../src/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_pb.ts","../src/gen/opentelemetry/proto/logs/v1/logs_pb.ts","../src/gen/opentelemetry/proto/collector/logs/v1/logs_service_pb.ts","../src/protobuf/converter.ts","../src/protobuf/plugin.ts","../src/index.ts"],"sourcesContent":["import { z } from \"zod/v4\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport { otlpMetricsZod, type datasource } from \"@kopai/core\";\n\n// https://github.com/open-telemetry/opentelemetry-specification/blob/49845849d2d8df07059f82033f39e96c561927cf/oteps/0122-otlp-http-json.md#response\nconst exportMetricsServiceResponseSchema = z.object({\n partialSuccess: z\n .object({\n rejectedDataPoints: z.string().optional(),\n errorMessage: z.string().optional(),\n })\n .optional(),\n});\n\nexport const metricsRoute: FastifyPluginAsyncZod<{\n writeMetricsDatasource: datasource.WriteMetricsDatasource;\n}> = async function (fastify, opts) {\n fastify.route({\n method: \"POST\",\n url: \"/v1/metrics\",\n schema: {\n body: otlpMetricsZod.metricsDataSchema,\n response: {\n 200: exportMetricsServiceResponseSchema,\n },\n },\n handler: async (req, res) => {\n const { rejectedDataPoints, errorMessage } =\n await opts.writeMetricsDatasource.writeMetrics(req.body);\n\n res.send({\n partialSuccess: {\n rejectedDataPoints,\n errorMessage,\n },\n });\n },\n });\n};\n","import { z } from \"zod/v4\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport { otlpZod, type datasource } from \"@kopai/core\";\n\n// https://github.com/open-telemetry/opentelemetry-specification/blob/49845849d2d8df07059f82033f39e96c561927cf/oteps/0122-otlp-http-json.md#response\nconst exportTracesServiceResponseSchema = z.object({\n partialSuccess: z\n .object({\n rejectedSpans: z.string().optional(),\n errorMessage: z.string().optional(),\n })\n .optional(),\n});\n\nexport const tracesRoute: FastifyPluginAsyncZod<{\n writeTracesDatasource: datasource.WriteTracesDatasource;\n}> = async function (fastify, opts) {\n fastify.route({\n method: \"POST\",\n url: \"/v1/traces\",\n schema: {\n body: otlpZod.tracesDataSchema,\n response: {\n 200: exportTracesServiceResponseSchema,\n },\n },\n handler: async (req, res) => {\n const { rejectedSpans, errorMessage } =\n await opts.writeTracesDatasource.writeTraces(req.body);\n\n res.send({\n partialSuccess: {\n rejectedSpans,\n errorMessage,\n },\n });\n },\n });\n};\n","import { z } from \"zod/v4\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport { otlpZod, type datasource } from \"@kopai/core\";\n\n// https://github.com/open-telemetry/opentelemetry-specification/blob/49845849d2d8df07059f82033f39e96c561927cf/oteps/0122-otlp-http-json.md#response\nconst exportLogsServiceResponseSchema = z.object({\n partialSuccess: z\n .object({\n rejectedLogRecords: z.string().optional(),\n errorMessage: z.string().optional(),\n })\n .optional(),\n});\n\nexport const logsRoute: FastifyPluginAsyncZod<{\n writeLogsDatasource: datasource.WriteLogsDatasource;\n}> = async function (fastify, opts) {\n fastify.route({\n method: \"POST\",\n url: \"/v1/logs\",\n schema: {\n body: otlpZod.logsDataSchema,\n response: {\n 200: exportLogsServiceResponseSchema,\n },\n },\n handler: async (req, res) => {\n const { rejectedLogRecords, errorMessage } =\n await opts.writeLogsDatasource.writeLogs(req.body);\n\n res.send({\n partialSuccess: {\n rejectedLogRecords,\n errorMessage,\n },\n });\n },\n });\n};\n","// https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#otlphttp-response\n\nimport { z } from \"zod/v4\";\nexport const grpcStatusCode = {\n OK: 0,\n CANCELLED: 1,\n UNKNOWN: 2,\n INVALID_ARGUMENT: 3,\n DEADLINE_EXCEEDED: 4,\n NOT_FOUND: 5,\n ALREADY_EXISTS: 6,\n PERMISSION_DENIED: 7,\n RESOURCE_EXHAUSTED: 8,\n FAILED_PRECONDITION: 9,\n ABORTED: 10,\n OUT_OF_RANGE: 11,\n UNIMPLEMENTED: 12,\n INTERNAL: 13,\n UNAVAILABLE: 14,\n DATA_LOSS: 15,\n UNAUTHENTICATED: 16,\n} as const;\n\nexport const grpcStatusSchema = z.object({\n message: z.string(),\n details: z.array(z.unknown()).optional(),\n});\n\nexport const grpcStatusCodeSchema = z.number().int().min(0).max(16);\n\nexport type GrpcStatusCode =\n (typeof grpcStatusCode)[keyof typeof grpcStatusCode];\n\n// Error response body for HTTP 4xx/5xx\nexport const otlpErrorResponseSchema = z.object({\n code: grpcStatusCodeSchema,\n // The Status.message field SHOULD contain a developer-facing error message as defined in Status message schema.\n message: z.string(),\n // The server MAY include Status.details field with additional details. Read below about what this field can contain in each specific failure case.\n details: z.array(z.unknown()).optional(),\n});\n\nexport type ErrorResponse = z.infer<typeof otlpErrorResponseSchema>;\n\n// Single field violation\nexport const fieldViolationSchema = z.object({\n field: z.string(), // path like \"resourceSpans[0].spans[2].traceId\"\n description: z.string(), // human-readable explanation\n reason: z.string().optional(), // e.g. \"INVALID_TRACE_ID\"\n});\n\nexport type FieldViolation = z.infer<typeof fieldViolationSchema>;\n\n// BadRequest detail\nexport const badRequestSchema = z.object({\n \"@type\": z.literal(\"type.googleapis.com/google.rpc.BadRequest\").optional(),\n fieldViolations: z.array(fieldViolationSchema),\n});\n\n/*\n * Full error response for HTTP 400\n *\n * example:\n *\n * {\n * \"code\": 3,\n * \"message\": \"invalid trace data\",\n * \"details\": [\n * {\n * \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n * \"fieldViolations\": [\n * {\n * \"field\": \"resourceSpans[0].scopeSpans[0].spans[0].traceId\",\n * \"description\": \"traceId must be 32 hex characters\",\n * \"reason\": \"INVALID_TRACE_ID\"\n * },\n * {\n * \"field\": \"resourceSpans[0].scopeSpans[0].spans[1].startTimeUnixNano\",\n * \"description\": \"startTimeUnixNano must be a positive integer\",\n * \"reason\": \"INVALID_TIMESTAMP\"\n * }\n * ]\n * }\n * ]\n * }\n */\nexport const otlpBadRequestErrorResponseSchema = z.object({\n code: z.number().int(),\n message: z.string(),\n details: z.array(badRequestSchema).optional(),\n});\n\nexport type OtlpBadRequestErrorResponse = z.infer<\n typeof otlpBadRequestErrorResponseSchema\n>;\n","import type { FastifySchemaValidationError } from \"fastify\";\nimport type { FieldViolation } from \"./otlp-schemas.js\";\n\nexport function extractLeafError(errors: unknown[][]): {\n path: (string | number)[];\n message: string;\n expected?: string;\n} {\n for (const branch of errors) {\n if (!Array.isArray(branch) || !branch.length) continue;\n const e = branch[0] as {\n code?: string;\n path?: (string | number)[];\n message?: string;\n expected?: string;\n errors?: unknown[][];\n };\n if (e?.code === \"invalid_union\" && e.errors) {\n const deeper = extractLeafError(e.errors);\n return {\n path: [...(e.path || []), ...deeper.path],\n message: deeper.message,\n expected: deeper.expected,\n };\n }\n return {\n path: e?.path || [],\n message: e?.message || \"Validation failed\",\n expected: e?.expected,\n };\n }\n return { path: [], message: \"Validation failed\" };\n}\n\nexport function toFieldViolation(\n error: FastifySchemaValidationError\n): FieldViolation {\n let field = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\") || \"\";\n let description = error.message ?? \"Validation failed\";\n\n if (error.keyword === \"invalid_union\" && error.params?.errors) {\n const leaf = extractLeafError(error.params.errors as unknown[][]);\n const leafPath = leaf.path\n .map((p) => (typeof p === \"number\" ? `[${p}]` : `.${p}`))\n .join(\"\")\n .replace(/^\\./, \"\");\n if (leafPath) {\n const sep = leafPath.startsWith(\"[\") ? \"\" : \".\";\n field = field ? `${field}${sep}${leafPath}` : leafPath;\n }\n description = leaf.expected ? `expected ${leaf.expected}` : leaf.message;\n }\n\n return { field: field || \"unknown\", description, reason: error.keyword };\n}\n","import type { GrpcStatusCode } from \"./otlp-schemas.js\";\n\nexport class CollectorError extends Error {\n constructor(\n message: string,\n public code: GrpcStatusCode\n ) {\n super(message);\n Object.setPrototypeOf(this, CollectorError.prototype);\n }\n}\n","import {\n type FastifyError,\n type FastifyReply,\n type FastifyRequest,\n} from \"fastify\";\n\nimport {\n type OtlpBadRequestErrorResponse,\n grpcStatusCode,\n type ErrorResponse,\n} from \"./otlp-schemas.js\";\nimport { toFieldViolation } from \"./field-violation.js\";\n\nimport { CollectorError } from \"./errors.js\";\n\nexport function collectorErrorHandler(\n error: FastifyError | Error | string,\n request: FastifyRequest,\n reply: FastifyReply\n) {\n if (isValidationError(error)) {\n return reply.status(400).send({\n code: grpcStatusCode.INVALID_ARGUMENT,\n message: \"Invalid data\",\n details: [\n {\n \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n fieldViolations: error.validation.map(toFieldViolation),\n },\n ],\n } satisfies OtlpBadRequestErrorResponse);\n }\n\n request.log.error(error);\n if (error instanceof CollectorError) {\n return reply.status(500).send({\n code: error.code,\n message: error.message,\n } satisfies ErrorResponse);\n }\n\n reply.status(500).send({ error: \"Internal Server Error\" });\n}\n\nfunction isFastifyError(error: unknown): error is FastifyError {\n return (\n error instanceof Error &&\n \"code\" in error &&\n typeof (error as FastifyError).code === \"string\"\n );\n}\n\nfunction isValidationError(\n error: unknown\n): error is FastifyError & Required<Pick<FastifyError, \"validation\">> {\n return (\n isFastifyError(error) &&\n \"validation\" in error &&\n Array.isArray((error as FastifyError).validation)\n );\n}\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/common/v1/common.proto (package opentelemetry.proto.common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/common/v1/common.proto.\n */\nexport const file_opentelemetry_proto_common_v1_common: GenFile = /*@__PURE__*/\n fileDesc(\"CipvcGVudGVsZW1ldHJ5L3Byb3RvL2NvbW1vbi92MS9jb21tb24ucHJvdG8SHW9wZW50ZWxlbWV0cnkucHJvdG8uY29tbW9uLn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8vcHJvdG8vb3RscC9jb21tb24vdjGqAh1PcGVuVGVsZW1ldHJ5LlByb3RvLkNvbW1vbi5WMWIGcHJvdG8z\");\n\n/**\n * Represents any type of attribute value. AnyValue may contain a\n * primitive value such as a string or integer or it may contain an arbitrary nested\n * object containing arrays, key-value lists and primitives.\n *\n * @generated from message opentelemetry.proto.common.v1.AnyValue\n */\nexport type AnyValue = Message<\"opentelemetry.proto.common.v1.AnyValue\"> & {\n /**\n * The value is one of the listed fields. It is valid for all values to be unspecified\n * in which case this AnyValue is considered to be \"empty\".\n *\n * @generated from oneof opentelemetry.proto.common.v1.AnyValue.value\n */\n value: {\n /**\n * @generated from field: string string_value = 1;\n */\n value: string;\n case: \"stringValue\";\n } | {\n /**\n * @generated from field: bool bool_value = 2;\n */\n value: boolean;\n case: \"boolValue\";\n } | {\n /**\n * @generated from field: int64 int_value = 3;\n */\n value: bigint;\n case: \"intValue\";\n } | {\n /**\n * @generated from field: double double_value = 4;\n */\n value: number;\n case: \"doubleValue\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.common.v1.ArrayValue array_value = 5;\n */\n value: ArrayValue;\n case: \"arrayValue\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6;\n */\n value: KeyValueList;\n case: \"kvlistValue\";\n } | {\n /**\n * @generated from field: bytes bytes_value = 7;\n */\n value: Uint8Array;\n case: \"bytesValue\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.AnyValue.\n * Use `create(AnyValueSchema)` to create a new message.\n */\nexport const AnyValueSchema: GenMessage<AnyValue> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 0);\n\n/**\n * ArrayValue is a list of AnyValue messages. We need ArrayValue as a message\n * since oneof in AnyValue does not allow repeated fields.\n *\n * @generated from message opentelemetry.proto.common.v1.ArrayValue\n */\nexport type ArrayValue = Message<\"opentelemetry.proto.common.v1.ArrayValue\"> & {\n /**\n * Array of values. The array may be empty (contain 0 elements).\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.AnyValue values = 1;\n */\n values: AnyValue[];\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.ArrayValue.\n * Use `create(ArrayValueSchema)` to create a new message.\n */\nexport const ArrayValueSchema: GenMessage<ArrayValue> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 1);\n\n/**\n * KeyValueList is a list of KeyValue messages. We need KeyValueList as a message\n * since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need\n * a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to\n * avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches\n * are semantically equivalent.\n *\n * @generated from message opentelemetry.proto.common.v1.KeyValueList\n */\nexport type KeyValueList = Message<\"opentelemetry.proto.common.v1.KeyValueList\"> & {\n /**\n * A collection of key/value pairs of key-value pairs. The list may be empty (may\n * contain 0 elements).\n *\n * The keys MUST be unique (it is not allowed to have more than one\n * value with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue values = 1;\n */\n values: KeyValue[];\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.KeyValueList.\n * Use `create(KeyValueListSchema)` to create a new message.\n */\nexport const KeyValueListSchema: GenMessage<KeyValueList> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 2);\n\n/**\n * Represents a key-value pair that is used to store Span attributes, Link\n * attributes, etc.\n *\n * @generated from message opentelemetry.proto.common.v1.KeyValue\n */\nexport type KeyValue = Message<\"opentelemetry.proto.common.v1.KeyValue\"> & {\n /**\n * The key name of the pair.\n *\n * @generated from field: string key = 1;\n */\n key: string;\n\n /**\n * The value of the pair.\n *\n * @generated from field: opentelemetry.proto.common.v1.AnyValue value = 2;\n */\n value?: AnyValue;\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.KeyValue.\n * Use `create(KeyValueSchema)` to create a new message.\n */\nexport const KeyValueSchema: GenMessage<KeyValue> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 3);\n\n/**\n * InstrumentationScope is a message representing the instrumentation scope information\n * such as the fully qualified name and version. \n *\n * @generated from message opentelemetry.proto.common.v1.InstrumentationScope\n */\nexport type InstrumentationScope = Message<\"opentelemetry.proto.common.v1.InstrumentationScope\"> & {\n /**\n * A name denoting the Instrumentation scope.\n * An empty instrumentation scope name means the name is unknown.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * Defines the version of the instrumentation scope.\n * An empty instrumentation scope version means the version is unknown.\n *\n * @generated from field: string version = 2;\n */\n version: string;\n\n /**\n * Additional attributes that describe the scope. [Optional].\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 3;\n */\n attributes: KeyValue[];\n\n /**\n * The number of attributes that were discarded. Attributes\n * can be discarded because their keys are too long or because there are too many\n * attributes. If this value is 0, then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 4;\n */\n droppedAttributesCount: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.InstrumentationScope.\n * Use `create(InstrumentationScopeSchema)` to create a new message.\n */\nexport const InstrumentationScopeSchema: GenMessage<InstrumentationScope> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 4);\n\n/**\n * A reference to an Entity.\n * Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs.\n *\n * Status: [Development]\n *\n * @generated from message opentelemetry.proto.common.v1.EntityRef\n */\nexport type EntityRef = Message<\"opentelemetry.proto.common.v1.EntityRef\"> & {\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the entity data\n * is recorded in. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n *\n * This schema_url applies to the data in this message and to the Resource attributes\n * referenced by id_keys and description_keys.\n * TODO: discuss if we are happy with this somewhat complicated definition of what\n * the schema_url applies to.\n *\n * This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.\n *\n * @generated from field: string schema_url = 1;\n */\n schemaUrl: string;\n\n /**\n * Defines the type of the entity. MUST not change during the lifetime of the entity.\n * For example: \"service\" or \"host\". This field is required and MUST not be empty\n * for valid entities.\n *\n * @generated from field: string type = 2;\n */\n type: string;\n\n /**\n * Attribute Keys that identify the entity.\n * MUST not change during the lifetime of the entity. The Id must contain at least one attribute.\n * These keys MUST exist in the containing {message}.attributes.\n *\n * @generated from field: repeated string id_keys = 3;\n */\n idKeys: string[];\n\n /**\n * Descriptive (non-identifying) attribute keys of the entity.\n * MAY change over the lifetime of the entity. MAY be empty.\n * These attribute keys are not part of entity's identity.\n * These keys MUST exist in the containing {message}.attributes.\n *\n * @generated from field: repeated string description_keys = 4;\n */\n descriptionKeys: string[];\n};\n\n/**\n * Describes the message opentelemetry.proto.common.v1.EntityRef.\n * Use `create(EntityRefSchema)` to create a new message.\n */\nexport const EntityRefSchema: GenMessage<EntityRef> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_common_v1_common, 5);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/resource/v1/resource.proto (package opentelemetry.proto.resource.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { EntityRef, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/resource/v1/resource.proto.\n */\nexport const file_opentelemetry_proto_resource_v1_resource: GenFile = /*@__PURE__*/\n fileDesc(\"Ci5vcGVudGVsZW1ldHJ5L3Byb3RvL3Jlc291cmNlL3YxL3Jlc291cmNlLnByb3RvEh9vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxIqgBCghSZXNvdXJjZRI7CgphdHRyaWJ1dGVzGAEgAygLMicub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuS2V5VmFsdWUSIAoYZHJvcHBlZF9hdHRyaWJ1dGVzX2NvdW50GAIgASgNEj0KC2VudGl0eV9yZWZzGAMgAygLMigub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuRW50aXR5UmVmQoMBCiJpby5vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxQg1SZXNvdXJjZVByb3RvUAFaKmdvLm9wZW50ZWxlbWV0cnkuaW8vcHJvdG8vb3RscC9yZXNvdXJjZS92MaoCH09wZW5UZWxlbWV0cnkuUHJvdG8uUmVzb3VyY2UuVjFiBnByb3RvMw\", [file_opentelemetry_proto_common_v1_common]);\n\n/**\n * Resource information.\n *\n * @generated from message opentelemetry.proto.resource.v1.Resource\n */\nexport type Resource = Message<\"opentelemetry.proto.resource.v1.Resource\"> & {\n /**\n * Set of attributes that describe the resource.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;\n */\n attributes: KeyValue[];\n\n /**\n * The number of dropped attributes. If the value is 0, then\n * no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 2;\n */\n droppedAttributesCount: number;\n\n /**\n * Set of entities that participate in this Resource.\n *\n * Note: keys in the references MUST exist in attributes of this message.\n *\n * Status: [Development]\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.EntityRef entity_refs = 3;\n */\n entityRefs: EntityRef[];\n};\n\n/**\n * Describes the message opentelemetry.proto.resource.v1.Resource.\n * Use `create(ResourceSchema)` to create a new message.\n */\nexport const ResourceSchema: GenMessage<Resource> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_resource_v1_resource, 0);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/trace/v1/trace.proto (package opentelemetry.proto.trace.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { InstrumentationScope, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Resource } from \"../../resource/v1/resource_pb.js\";\nimport { file_opentelemetry_proto_resource_v1_resource } from \"../../resource/v1/resource_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/trace/v1/trace.proto.\n */\nexport const file_opentelemetry_proto_trace_v1_trace: GenFile = /*@__PURE__*/\n fileDesc(\"CihvcGVudGVsZW1ldHJ5L3Byb3RvL3RyYWNlL3YxL3RyYWNlLnBy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fRVJST1IQAkoECAEQAiqcAQoJU3BhbkZsYWdzEhkKFVNQQU5fRkxBR1NfRE9fTk9UX1VTRRAAEiAKG1NQQU5fRkxBR1NfVFJBQ0VfRkxBR1NfTUFTSxD/ARIqCiVTUEFOX0ZMQUdTX0NPTlRFWFRfSEFTX0lTX1JFTU9URV9NQVNLEIACEiYKIVNQQU5fRkxBR1NfQ09OVEVYVF9JU19SRU1PVEVfTUFTSxCABEJ3Ch9pby5vcGVudGVsZW1ldHJ5LnByb3RvLnRyYWNlLnYxQgpUcmFjZVByb3RvUAFaJ2dvLm9wZW50ZWxlbWV0cnkuaW8vcHJvdG8vb3RscC90cmFjZS92MaoCHE9wZW5UZWxlbWV0cnkuUHJvdG8uVHJhY2UuVjFiBnByb3RvMw\", [file_opentelemetry_proto_common_v1_common, file_opentelemetry_proto_resource_v1_resource]);\n\n/**\n * TracesData represents the traces data that can be stored in a persistent storage,\n * OR can be embedded by other protocols that transfer OTLP traces data but do\n * not implement the OTLP protocol.\n *\n * The main difference between this message and collector protocol is that\n * in this message there will not be any \"control\" or \"metadata\" specific to\n * OTLP protocol.\n *\n * When new fields are added into this message, the OTLP request MUST be updated\n * as well.\n *\n * @generated from message opentelemetry.proto.trace.v1.TracesData\n */\nexport type TracesData = Message<\"opentelemetry.proto.trace.v1.TracesData\"> & {\n /**\n * An array of ResourceSpans.\n * For data coming from a single resource this array will typically contain\n * one element. Intermediary nodes that receive data from multiple origins\n * typically batch the data before forwarding further and in that case this\n * array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;\n */\n resourceSpans: ResourceSpans[];\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.TracesData.\n * Use `create(TracesDataSchema)` to create a new message.\n */\nexport const TracesDataSchema: GenMessage<TracesData> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 0);\n\n/**\n * A collection of ScopeSpans from a Resource.\n *\n * @generated from message opentelemetry.proto.trace.v1.ResourceSpans\n */\nexport type ResourceSpans = Message<\"opentelemetry.proto.trace.v1.ResourceSpans\"> & {\n /**\n * The resource for the spans in this message.\n * If this field is not set then no resource info is known.\n *\n * @generated from field: opentelemetry.proto.resource.v1.Resource resource = 1;\n */\n resource?: Resource;\n\n /**\n * A list of ScopeSpans that originate from a resource.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;\n */\n scopeSpans: ScopeSpans[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the resource data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"resource\" field. It does not apply\n * to the data in the \"scope_spans\" field which have their own schema_url field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.ResourceSpans.\n * Use `create(ResourceSpansSchema)` to create a new message.\n */\nexport const ResourceSpansSchema: GenMessage<ResourceSpans> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 1);\n\n/**\n * A collection of Spans produced by an InstrumentationScope.\n *\n * @generated from message opentelemetry.proto.trace.v1.ScopeSpans\n */\nexport type ScopeSpans = Message<\"opentelemetry.proto.trace.v1.ScopeSpans\"> & {\n /**\n * The instrumentation scope information for the spans in this message.\n * Semantically when InstrumentationScope isn't set, it is equivalent with\n * an empty instrumentation scope name (unknown).\n *\n * @generated from field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1;\n */\n scope?: InstrumentationScope;\n\n /**\n * A list of Spans that originate from an instrumentation scope.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.Span spans = 2;\n */\n spans: Span[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the span data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"scope\" field and all spans and span\n * events in the \"spans\" field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.ScopeSpans.\n * Use `create(ScopeSpansSchema)` to create a new message.\n */\nexport const ScopeSpansSchema: GenMessage<ScopeSpans> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 2);\n\n/**\n * A Span represents a single operation performed by a single component of the system.\n *\n * The next available field id is 17.\n *\n * @generated from message opentelemetry.proto.trace.v1.Span\n */\nexport type Span = Message<\"opentelemetry.proto.trace.v1.Span\"> & {\n /**\n * A unique identifier for a trace. All spans from the same trace share\n * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\n * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is required.\n *\n * @generated from field: bytes trace_id = 1;\n */\n traceId: Uint8Array;\n\n /**\n * A unique identifier for a span within a trace, assigned when the span\n * is created. The ID is an 8-byte array. An ID with all zeroes OR of length\n * other than 8 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is required.\n *\n * @generated from field: bytes span_id = 2;\n */\n spanId: Uint8Array;\n\n /**\n * trace_state conveys information about request position in multiple distributed tracing graphs.\n * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header\n * See also https://github.com/w3c/distributed-tracing for more details about this field.\n *\n * @generated from field: string trace_state = 3;\n */\n traceState: string;\n\n /**\n * The `span_id` of this span's parent span. If this is a root span, then this\n * field must be empty. The ID is an 8-byte array.\n *\n * @generated from field: bytes parent_span_id = 4;\n */\n parentSpanId: Uint8Array;\n\n /**\n * Flags, a bit field.\n *\n * Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n * Context specification. To read the 8-bit W3C trace flag, use\n * `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n *\n * See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n *\n * Bits 8 and 9 represent the 3 states of whether a span's parent\n * is remote. The states are (unknown, is not remote, is remote).\n * To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n * To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n *\n * When creating span messages, if the message is logically forwarded from another source\n * with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD\n * be copied as-is. If creating from a source that does not have an equivalent flags field\n * (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST\n * be set to zero.\n * Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n *\n * [Optional].\n *\n * @generated from field: fixed32 flags = 16;\n */\n flags: number;\n\n /**\n * A description of the span's operation.\n *\n * For example, the name can be a qualified method name or a file name\n * and a line number where the operation is called. A best practice is to use\n * the same display name at the same call point in an application.\n * This makes it easier to correlate spans in different traces.\n *\n * This field is semantically required to be set to non-empty string.\n * Empty value is equivalent to an unknown span name.\n *\n * This field is required.\n *\n * @generated from field: string name = 5;\n */\n name: string;\n\n /**\n * Distinguishes between spans generated in a particular context. For example,\n * two spans with the same name may be distinguished using `CLIENT` (caller)\n * and `SERVER` (callee) to identify queueing latency associated with the span.\n *\n * @generated from field: opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;\n */\n kind: Span_SpanKind;\n\n /**\n * The start time of the span. On the client side, this is the time\n * kept by the local machine where the span execution starts. On the server side, this\n * is the time when the server's application handler starts running.\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n *\n * This field is semantically required and it is expected that end_time >= start_time.\n *\n * @generated from field: fixed64 start_time_unix_nano = 7;\n */\n startTimeUnixNano: bigint;\n\n /**\n * The end time of the span. On the client side, this is the time\n * kept by the local machine where the span execution ends. On the server side, this\n * is the time when the server application handler stops running.\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n *\n * This field is semantically required and it is expected that end_time >= start_time.\n *\n * @generated from field: fixed64 end_time_unix_nano = 8;\n */\n endTimeUnixNano: bigint;\n\n /**\n * A collection of key/value pairs. Note, global attributes\n * like server name can be set using the resource API. Examples of attributes:\n *\n * \"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n * \"/http/server_latency\": 300\n * \"example.com/myattribute\": true\n * \"example.com/score\": 10.239\n *\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;\n */\n attributes: KeyValue[];\n\n /**\n * The number of attributes that were discarded. Attributes\n * can be discarded because their keys are too long or because there are too many\n * attributes. If this value is 0, then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 10;\n */\n droppedAttributesCount: number;\n\n /**\n * A collection of Event items.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.Span.Event events = 11;\n */\n events: Span_Event[];\n\n /**\n * The number of dropped events. If the value is 0, then no\n * events were dropped.\n *\n * @generated from field: uint32 dropped_events_count = 12;\n */\n droppedEventsCount: number;\n\n /**\n * A collection of Links, which are references from this span to a span\n * in the same or different trace.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.Span.Link links = 13;\n */\n links: Span_Link[];\n\n /**\n * The number of dropped links after the maximum size was\n * enforced. If this value is 0, then no links were dropped.\n *\n * @generated from field: uint32 dropped_links_count = 14;\n */\n droppedLinksCount: number;\n\n /**\n * An optional final status for this span. Semantically when Status isn't set, it means\n * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).\n *\n * @generated from field: opentelemetry.proto.trace.v1.Status status = 15;\n */\n status?: Status;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Span.\n * Use `create(SpanSchema)` to create a new message.\n */\nexport const SpanSchema: GenMessage<Span> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 3);\n\n/**\n * Event is a time-stamped annotation of the span, consisting of user-supplied\n * text description and key-value pairs.\n *\n * @generated from message opentelemetry.proto.trace.v1.Span.Event\n */\nexport type Span_Event = Message<\"opentelemetry.proto.trace.v1.Span.Event\"> & {\n /**\n * The time the event occurred.\n *\n * @generated from field: fixed64 time_unix_nano = 1;\n */\n timeUnixNano: bigint;\n\n /**\n * The name of the event.\n * This field is semantically required to be set to non-empty string.\n *\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * A collection of attribute key/value pairs on the event.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 3;\n */\n attributes: KeyValue[];\n\n /**\n * The number of dropped attributes. If the value is 0,\n * then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 4;\n */\n droppedAttributesCount: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Span.Event.\n * Use `create(Span_EventSchema)` to create a new message.\n */\nexport const Span_EventSchema: GenMessage<Span_Event> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 3, 0);\n\n/**\n * A pointer from the current span to another span in the same trace or in a\n * different trace. For example, this can be used in batching operations,\n * where a single batch handler processes multiple requests from different\n * traces or when the handler receives a request from a different project.\n *\n * @generated from message opentelemetry.proto.trace.v1.Span.Link\n */\nexport type Span_Link = Message<\"opentelemetry.proto.trace.v1.Span.Link\"> & {\n /**\n * A unique identifier of a trace that this linked span is part of. The ID is a\n * 16-byte array.\n *\n * @generated from field: bytes trace_id = 1;\n */\n traceId: Uint8Array;\n\n /**\n * A unique identifier for the linked span. The ID is an 8-byte array.\n *\n * @generated from field: bytes span_id = 2;\n */\n spanId: Uint8Array;\n\n /**\n * The trace_state associated with the link.\n *\n * @generated from field: string trace_state = 3;\n */\n traceState: string;\n\n /**\n * A collection of attribute key/value pairs on the link.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 4;\n */\n attributes: KeyValue[];\n\n /**\n * The number of dropped attributes. If the value is 0,\n * then no attributes were dropped.\n *\n * @generated from field: uint32 dropped_attributes_count = 5;\n */\n droppedAttributesCount: number;\n\n /**\n * Flags, a bit field.\n *\n * Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n * Context specification. To read the 8-bit W3C trace flag, use\n * `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n *\n * See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n *\n * Bits 8 and 9 represent the 3 states of whether the link is remote.\n * The states are (unknown, is not remote, is remote).\n * To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n * To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n *\n * Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n * When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.\n *\n * [Optional].\n *\n * @generated from field: fixed32 flags = 6;\n */\n flags: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Span.Link.\n * Use `create(Span_LinkSchema)` to create a new message.\n */\nexport const Span_LinkSchema: GenMessage<Span_Link> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 3, 1);\n\n/**\n * SpanKind is the type of span. Can be used to specify additional relationships between spans\n * in addition to a parent/child relationship.\n *\n * @generated from enum opentelemetry.proto.trace.v1.Span.SpanKind\n */\nexport enum Span_SpanKind {\n /**\n * Unspecified. Do NOT use as default.\n * Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.\n *\n * @generated from enum value: SPAN_KIND_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * Indicates that the span represents an internal operation within an application,\n * as opposed to an operation happening at the boundaries. Default value.\n *\n * @generated from enum value: SPAN_KIND_INTERNAL = 1;\n */\n INTERNAL = 1,\n\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote network request.\n *\n * @generated from enum value: SPAN_KIND_SERVER = 2;\n */\n SERVER = 2,\n\n /**\n * Indicates that the span describes a request to some remote service.\n *\n * @generated from enum value: SPAN_KIND_CLIENT = 3;\n */\n CLIENT = 3,\n\n /**\n * Indicates that the span describes a producer sending a message to a broker.\n * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship\n * between producer and consumer spans. A PRODUCER span ends when the message was accepted\n * by the broker while the logical processing of the message might span a much longer time.\n *\n * @generated from enum value: SPAN_KIND_PRODUCER = 4;\n */\n PRODUCER = 4,\n\n /**\n * Indicates that the span describes consumer receiving a message from a broker.\n * Like the PRODUCER kind, there is often no direct critical path latency relationship\n * between producer and consumer spans.\n *\n * @generated from enum value: SPAN_KIND_CONSUMER = 5;\n */\n CONSUMER = 5,\n}\n\n/**\n * Describes the enum opentelemetry.proto.trace.v1.Span.SpanKind.\n */\nexport const Span_SpanKindSchema: GenEnum<Span_SpanKind> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_trace_v1_trace, 3, 0);\n\n/**\n * The Status type defines a logical error model that is suitable for different\n * programming environments, including REST APIs and RPC APIs.\n *\n * @generated from message opentelemetry.proto.trace.v1.Status\n */\nexport type Status = Message<\"opentelemetry.proto.trace.v1.Status\"> & {\n /**\n * A developer-facing human readable error message.\n *\n * @generated from field: string message = 2;\n */\n message: string;\n\n /**\n * The status code.\n *\n * @generated from field: opentelemetry.proto.trace.v1.Status.StatusCode code = 3;\n */\n code: Status_StatusCode;\n};\n\n/**\n * Describes the message opentelemetry.proto.trace.v1.Status.\n * Use `create(StatusSchema)` to create a new message.\n */\nexport const StatusSchema: GenMessage<Status> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_trace_v1_trace, 4);\n\n/**\n * For the semantics of status codes see\n * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status\n *\n * @generated from enum opentelemetry.proto.trace.v1.Status.StatusCode\n */\nexport enum Status_StatusCode {\n /**\n * The default status.\n *\n * @generated from enum value: STATUS_CODE_UNSET = 0;\n */\n UNSET = 0,\n\n /**\n * The Span has been validated by an Application developer or Operator to \n * have completed successfully.\n *\n * @generated from enum value: STATUS_CODE_OK = 1;\n */\n OK = 1,\n\n /**\n * The Span contains an error.\n *\n * @generated from enum value: STATUS_CODE_ERROR = 2;\n */\n ERROR = 2,\n}\n\n/**\n * Describes the enum opentelemetry.proto.trace.v1.Status.StatusCode.\n */\nexport const Status_StatusCodeSchema: GenEnum<Status_StatusCode> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_trace_v1_trace, 4, 0);\n\n/**\n * SpanFlags represents constants used to interpret the\n * Span.flags field, which is protobuf 'fixed32' type and is to\n * be used as bit-fields. Each non-zero value defined in this enum is\n * a bit-mask. To extract the bit-field, for example, use an\n * expression like:\n *\n * (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)\n *\n * See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n *\n * Note that Span flags were introduced in version 1.1 of the\n * OpenTelemetry protocol. Older Span producers do not set this\n * field, consequently consumers should not rely on the absence of a\n * particular flag bit to indicate the presence of a particular feature.\n *\n * @generated from enum opentelemetry.proto.trace.v1.SpanFlags\n */\nexport enum SpanFlags {\n /**\n * The zero value for the enum. Should not be used for comparisons.\n * Instead use bitwise \"and\" with the appropriate mask as shown above.\n *\n * @generated from enum value: SPAN_FLAGS_DO_NOT_USE = 0;\n */\n DO_NOT_USE = 0,\n\n /**\n * Bits 0-7 are used for trace flags.\n *\n * @generated from enum value: SPAN_FLAGS_TRACE_FLAGS_MASK = 255;\n */\n TRACE_FLAGS_MASK = 255,\n\n /**\n * Bits 8 and 9 are used to indicate that the parent span or link span is remote.\n * Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.\n * Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote.\n *\n * @generated from enum value: SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256;\n */\n CONTEXT_HAS_IS_REMOTE_MASK = 256,\n\n /**\n * @generated from enum value: SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512;\n */\n CONTEXT_IS_REMOTE_MASK = 512,\n}\n\n/**\n * Describes the enum opentelemetry.proto.trace.v1.SpanFlags.\n */\nexport const SpanFlagsSchema: GenEnum<SpanFlags> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_trace_v1_trace, 0);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/collector/trace/v1/trace_service.proto (package opentelemetry.proto.collector.trace.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { ResourceSpans } from \"../../../trace/v1/trace_pb.js\";\nimport { file_opentelemetry_proto_trace_v1_trace } from \"../../../trace/v1/trace_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/collector/trace/v1/trace_service.proto.\n */\nexport const file_opentelemetry_proto_collector_trace_v1_trace_service: GenFile = /*@__PURE__*/\n fileDesc(\"CjpvcGVudGVsZW1ldHJ5L3Byb3RvL2NvbGxlY3Rvci90cmFjZS92MS90cmFjZV9zZXJ2aWNlLnByb3RvEiZvcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci50cmFjZS52MSJgChlFeHBvcnRUcmFjZVNlcnZpY2VSZXF1ZXN0EkMKDnJlc291cmNlX3NwYW5zGAEgAygLMisub3BlbnRlbGVtZXRyeS5wcm90by50cmFjZS52MS5SZXNvdXJjZVNwYW5zIngKGkV4cG9ydFRyYWNlU2VydmljZVJlc3BvbnNlEloKD3BhcnRpYWxfc3VjY2VzcxgBIAEoCzJBLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLnRyYWNlLnYxLkV4cG9ydFRyYWNlUGFydGlhbFN1Y2Nlc3MiSgoZRXhwb3J0VHJhY2VQYXJ0aWFsU3VjY2VzcxIWCg5yZWplY3RlZF9zcGFucxgBIAEoAxIVCg1lcnJvcl9tZXNzYWdlGAIgASgJMqIBCgxUcmFjZVNlcnZpY2USkQEKBkV4cG9ydBJBLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLnRyYWNlLnYxLkV4cG9ydFRyYWNlU2VydmljZVJlcXVlc3QaQi5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci50cmFjZS52MS5FeHBvcnRUcmFjZVNlcnZpY2VSZXNwb25zZSIAQpwBCilpby5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci50cmFjZS52MUIRVHJhY2VTZXJ2aWNlUHJvdG9QAVoxZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2NvbGxlY3Rvci90cmFjZS92MaoCJk9wZW5UZWxlbWV0cnkuUHJvdG8uQ29sbGVjdG9yLlRyYWNlLlYxYgZwcm90bzM\", [file_opentelemetry_proto_trace_v1_trace]);\n\n/**\n * @generated from message opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n */\nexport type ExportTraceServiceRequest = Message<\"opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\"> & {\n /**\n * An array of ResourceSpans.\n * For data coming from a single resource this array will typically contain one\n * element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n * data from multiple origins typically batch the data before forwarding further and\n * in that case this array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;\n */\n resourceSpans: ResourceSpans[];\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.\n * Use `create(ExportTraceServiceRequestSchema)` to create a new message.\n */\nexport const ExportTraceServiceRequestSchema: GenMessage<ExportTraceServiceRequest> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 0);\n\n/**\n * @generated from message opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n */\nexport type ExportTraceServiceResponse = Message<\"opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\"> & {\n /**\n * The details of a partially successful export request.\n *\n * If the request is only partially accepted\n * (i.e. when the server accepts only parts of the data and rejects the rest)\n * the server MUST initialize the `partial_success` field and MUST\n * set the `rejected_<signal>` with the number of items it rejected.\n *\n * Servers MAY also make use of the `partial_success` field to convey\n * warnings/suggestions to senders even when the request was fully accepted.\n * In such cases, the `rejected_<signal>` MUST have a value of `0` and\n * the `error_message` MUST be non-empty.\n *\n * A `partial_success` message with an empty value (rejected_<signal> = 0 and\n * `error_message` = \"\") is equivalent to it not being set/present. Senders\n * SHOULD interpret it the same way as in the full success case.\n *\n * @generated from field: opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;\n */\n partialSuccess?: ExportTracePartialSuccess;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.\n * Use `create(ExportTraceServiceResponseSchema)` to create a new message.\n */\nexport const ExportTraceServiceResponseSchema: GenMessage<ExportTraceServiceResponse> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 1);\n\n/**\n * @generated from message opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n */\nexport type ExportTracePartialSuccess = Message<\"opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\"> & {\n /**\n * The number of rejected spans.\n *\n * A `rejected_<signal>` field holding a `0` value indicates that the\n * request was fully accepted.\n *\n * @generated from field: int64 rejected_spans = 1;\n */\n rejectedSpans: bigint;\n\n /**\n * A developer-facing human-readable message in English. It should be used\n * either to explain why the server rejected parts of the data during a partial\n * success or to convey warnings/suggestions during a full success. The message\n * should offer guidance on how users can address such issues.\n *\n * error_message is an optional field. An error_message with an empty value\n * is equivalent to it not being set.\n *\n * @generated from field: string error_message = 2;\n */\n errorMessage: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.\n * Use `create(ExportTracePartialSuccessSchema)` to create a new message.\n */\nexport const ExportTracePartialSuccessSchema: GenMessage<ExportTracePartialSuccess> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 2);\n\n/**\n * Service that can be used to push spans between one Application instrumented with\n * OpenTelemetry and a collector, or between a collector and a central collector (in this\n * case spans are sent/received to/from multiple Applications).\n *\n * @generated from service opentelemetry.proto.collector.trace.v1.TraceService\n */\nexport const TraceService: GenService<{\n /**\n * @generated from rpc opentelemetry.proto.collector.trace.v1.TraceService.Export\n */\n export: {\n methodKind: \"unary\";\n input: typeof ExportTraceServiceRequestSchema;\n output: typeof ExportTraceServiceResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_opentelemetry_proto_collector_trace_v1_trace_service, 0);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/metrics/v1/metrics.proto (package opentelemetry.proto.metrics.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { InstrumentationScope, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Resource } from \"../../resource/v1/resource_pb.js\";\nimport { file_opentelemetry_proto_resource_v1_resource } from \"../../resource/v1/resource_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/metrics/v1/metrics.proto.\n */\nexport const file_opentelemetry_proto_metrics_v1_metrics: GenFile = /*@__PURE__*/\n fileDesc(\"CixvcGVudGVsZW1ldHJ5L3Byb3RvL21ldHJpY3MvdjEvbWV0cmljcy5wcm90bxIeb3BlbnRlbGVtZXRyeS5wcm90by5tZXRyaWNzLnYxIlgKC01ldHJpY3NEYXRhEkkKEHJlc291cmNlX21ldHJpY3MYASADKAsyLy5vcGVudGVsZW1ldHJ5LnByb3RvLm1ldHJpY3MudjEuUmVzb3VyY2VNZXRyaWNzIq8BCg9SZXNvdXJjZU1ldHJpY3MSOwoIcmVzb3VyY2UYASABKAsyKS5vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxLlJlc291cmNlEkMKDXNjb3BlX21ldHJpY3MYAiADKAsyLC5vcGVudGVsZW1ldHJ5LnByb3RvLm1ldHJpY3MudjEuU2NvcGVNZXRyaWNzEhIKCnNjaGVtYV91cmwYAyABKAlKBgjoBxDpByKfAQoMU2NvcGVNZXRyaWNzEkIKBXNjb3BlGAEgASgLMjMub3BlbnRlbGVtZXRye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xBR1NfTk9fUkVDT1JERURfVkFMVUVfTUFTSxABQn8KIWlvLm9wZW50ZWxlbWV0cnkucHJvdG8ubWV0cmljcy52MUIMTWV0cmljc1Byb3RvUAFaKWdvLm9wZW50ZWxlbWV0cnkuaW8vcHJvdG8vb3RscC9tZXRyaWNzL3YxqgIeT3BlblRlbGVtZXRyeS5Qcm90by5NZXRyaWNzLlYxYgZwcm90bzM\", [file_opentelemetry_proto_common_v1_common, file_opentelemetry_proto_resource_v1_resource]);\n\n/**\n * MetricsData represents the metrics data that can be stored in a persistent\n * storage, OR can be embedded by other protocols that transfer OTLP metrics\n * data but do not implement the OTLP protocol.\n *\n * MetricsData\n * └─── ResourceMetrics\n * ├── Resource\n * ├── SchemaURL\n * └── ScopeMetrics\n * ├── Scope\n * ├── SchemaURL\n * └── Metric\n * ├── Name\n * ├── Description\n * ├── Unit\n * └── data\n * ├── Gauge\n * ├── Sum\n * ├── Histogram\n * ├── ExponentialHistogram\n * └── Summary\n *\n * The main difference between this message and collector protocol is that\n * in this message there will not be any \"control\" or \"metadata\" specific to\n * OTLP protocol.\n *\n * When new fields are added into this message, the OTLP request MUST be updated\n * as well.\n *\n * @generated from message opentelemetry.proto.metrics.v1.MetricsData\n */\nexport type MetricsData = Message<\"opentelemetry.proto.metrics.v1.MetricsData\"> & {\n /**\n * An array of ResourceMetrics.\n * For data coming from a single resource this array will typically contain\n * one element. Intermediary nodes that receive data from multiple origins\n * typically batch the data before forwarding further and in that case this\n * array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;\n */\n resourceMetrics: ResourceMetrics[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.MetricsData.\n * Use `create(MetricsDataSchema)` to create a new message.\n */\nexport const MetricsDataSchema: GenMessage<MetricsData> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 0);\n\n/**\n * A collection of ScopeMetrics from a Resource.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ResourceMetrics\n */\nexport type ResourceMetrics = Message<\"opentelemetry.proto.metrics.v1.ResourceMetrics\"> & {\n /**\n * The resource for the metrics in this message.\n * If this field is not set then no resource info is known.\n *\n * @generated from field: opentelemetry.proto.resource.v1.Resource resource = 1;\n */\n resource?: Resource;\n\n /**\n * A list of metrics that originate from a resource.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;\n */\n scopeMetrics: ScopeMetrics[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the resource data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"resource\" field. It does not apply\n * to the data in the \"scope_metrics\" field which have their own schema_url field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ResourceMetrics.\n * Use `create(ResourceMetricsSchema)` to create a new message.\n */\nexport const ResourceMetricsSchema: GenMessage<ResourceMetrics> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 1);\n\n/**\n * A collection of Metrics produced by an Scope.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ScopeMetrics\n */\nexport type ScopeMetrics = Message<\"opentelemetry.proto.metrics.v1.ScopeMetrics\"> & {\n /**\n * The instrumentation scope information for the metrics in this message.\n * Semantically when InstrumentationScope isn't set, it is equivalent with\n * an empty instrumentation scope name (unknown).\n *\n * @generated from field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1;\n */\n scope?: InstrumentationScope;\n\n /**\n * A list of metrics that originate from an instrumentation library.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Metric metrics = 2;\n */\n metrics: Metric[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the metric data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"scope\" field and all metrics in the\n * \"metrics\" field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ScopeMetrics.\n * Use `create(ScopeMetricsSchema)` to create a new message.\n */\nexport const ScopeMetricsSchema: GenMessage<ScopeMetrics> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 2);\n\n/**\n * Defines a Metric which has one or more timeseries. The following is a\n * brief summary of the Metric data model. For more details, see:\n *\n * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md\n *\n * The data model and relation between entities is shown in the\n * diagram below. Here, \"DataPoint\" is the term used to refer to any\n * one of the specific data point value types, and \"points\" is the term used\n * to refer to any one of the lists of points contained in the Metric.\n *\n * - Metric is composed of a metadata and data.\n * - Metadata part contains a name, description, unit.\n * - Data is one of the possible types (Sum, Gauge, Histogram, Summary).\n * - DataPoint contains timestamps, attributes, and one of the possible value type\n * fields.\n *\n * Metric\n * +------------+\n * |name |\n * |description |\n * |unit | +------------------------------------+\n * |data |---> |Gauge, Sum, Histogram, Summary, ... |\n * +------------+ +------------------------------------+\n *\n * Data [One of Gauge, Sum, Histogram, Summary, ...]\n * +-----------+\n * |... | // Metadata about the Data.\n * |points |--+\n * +-----------+ |\n * | +---------------------------+\n * | |DataPoint 1 |\n * v |+------+------+ +------+ |\n * +-----+ ||label |label |...|label | |\n * | 1 |-->||value1|value2|...|valueN| |\n * +-----+ |+------+------+ +------+ |\n * | . | |+-----+ |\n * | . | ||value| |\n * | . | |+-----+ |\n * | . | +---------------------------+\n * | . | .\n * | . | .\n * | . | .\n * | . | +---------------------------+\n * | . | |DataPoint M |\n * +-----+ |+------+------+ +------+ |\n * | M |-->||label |label |...|label | |\n * +-----+ ||value1|value2|...|valueN| |\n * |+------+------+ +------+ |\n * |+-----+ |\n * ||value| |\n * |+-----+ |\n * +---------------------------+\n *\n * Each distinct type of DataPoint represents the output of a specific\n * aggregation function, the result of applying the DataPoint's\n * associated function of to one or more measurements.\n *\n * All DataPoint types have three common fields:\n * - Attributes includes key-value pairs associated with the data point\n * - TimeUnixNano is required, set to the end time of the aggregation\n * - StartTimeUnixNano is optional, but strongly encouraged for DataPoints\n * having an AggregationTemporality field, as discussed below.\n *\n * Both TimeUnixNano and StartTimeUnixNano values are expressed as\n * UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n *\n * # TimeUnixNano\n *\n * This field is required, having consistent interpretation across\n * DataPoint types. TimeUnixNano is the moment corresponding to when\n * the data point's aggregate value was captured.\n *\n * Data points with the 0 value for TimeUnixNano SHOULD be rejected\n * by consumers.\n *\n * # StartTimeUnixNano\n *\n * StartTimeUnixNano in general allows detecting when a sequence of\n * observations is unbroken. This field indicates to consumers the\n * start time for points with cumulative and delta\n * AggregationTemporality, and it should be included whenever possible\n * to support correct rate calculation. Although it may be omitted\n * when the start time is truly unknown, setting StartTimeUnixNano is\n * strongly encouraged.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Metric\n */\nexport type Metric = Message<\"opentelemetry.proto.metrics.v1.Metric\"> & {\n /**\n * The name of the metric.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * A description of the metric, which can be used in documentation.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The unit in which the metric value is reported. Follows the format\n * described by https://unitsofmeasure.org/ucum.html.\n *\n * @generated from field: string unit = 3;\n */\n unit: string;\n\n /**\n * Data determines the aggregation type (if any) of the metric, what is the\n * reported value type for the data points, as well as the relatationship to\n * the time interval over which they are reported.\n *\n * @generated from oneof opentelemetry.proto.metrics.v1.Metric.data\n */\n data: {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Gauge gauge = 5;\n */\n value: Gauge;\n case: \"gauge\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Sum sum = 7;\n */\n value: Sum;\n case: \"sum\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Histogram histogram = 9;\n */\n value: Histogram;\n case: \"histogram\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10;\n */\n value: ExponentialHistogram;\n case: \"exponentialHistogram\";\n } | {\n /**\n * @generated from field: opentelemetry.proto.metrics.v1.Summary summary = 11;\n */\n value: Summary;\n case: \"summary\";\n } | { case: undefined; value?: undefined };\n\n /**\n * Additional metadata attributes that describe the metric. [Optional].\n * Attributes are non-identifying.\n * Consumers SHOULD NOT need to be aware of these attributes.\n * These attributes MAY be used to encode information allowing\n * for lossless roundtrip translation to / from another data model.\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue metadata = 12;\n */\n metadata: KeyValue[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Metric.\n * Use `create(MetricSchema)` to create a new message.\n */\nexport const MetricSchema: GenMessage<Metric> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 3);\n\n/**\n * Gauge represents the type of a scalar metric that always exports the\n * \"current value\" for every data point. It should be used for an \"unknown\"\n * aggregation.\n *\n * A Gauge does not support different aggregation temporalities. Given the\n * aggregation is unknown, points cannot be combined using the same\n * aggregation, regardless of aggregation temporalities. Therefore,\n * AggregationTemporality is not included. Consequently, this also means\n * \"StartTimeUnixNano\" is ignored for all data points.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Gauge\n */\nexport type Gauge = Message<\"opentelemetry.proto.metrics.v1.Gauge\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;\n */\n dataPoints: NumberDataPoint[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Gauge.\n * Use `create(GaugeSchema)` to create a new message.\n */\nexport const GaugeSchema: GenMessage<Gauge> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 4);\n\n/**\n * Sum represents the type of a scalar metric that is calculated as a sum of all\n * reported measurements over a time interval.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Sum\n */\nexport type Sum = Message<\"opentelemetry.proto.metrics.v1.Sum\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;\n */\n dataPoints: NumberDataPoint[];\n\n /**\n * aggregation_temporality describes if the aggregator reports delta changes\n * since last report time, or cumulative changes since a fixed start time.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;\n */\n aggregationTemporality: AggregationTemporality;\n\n /**\n * Represents whether the sum is monotonic.\n *\n * @generated from field: bool is_monotonic = 3;\n */\n isMonotonic: boolean;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Sum.\n * Use `create(SumSchema)` to create a new message.\n */\nexport const SumSchema: GenMessage<Sum> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 5);\n\n/**\n * Histogram represents the type of a metric that is calculated by aggregating\n * as a Histogram of all reported measurements over a time interval.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Histogram\n */\nexport type Histogram = Message<\"opentelemetry.proto.metrics.v1.Histogram\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;\n */\n dataPoints: HistogramDataPoint[];\n\n /**\n * aggregation_temporality describes if the aggregator reports delta changes\n * since last report time, or cumulative changes since a fixed start time.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;\n */\n aggregationTemporality: AggregationTemporality;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Histogram.\n * Use `create(HistogramSchema)` to create a new message.\n */\nexport const HistogramSchema: GenMessage<Histogram> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 6);\n\n/**\n * ExponentialHistogram represents the type of a metric that is calculated by aggregating\n * as a ExponentialHistogram of all reported double measurements over a time interval.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ExponentialHistogram\n */\nexport type ExponentialHistogram = Message<\"opentelemetry.proto.metrics.v1.ExponentialHistogram\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;\n */\n dataPoints: ExponentialHistogramDataPoint[];\n\n /**\n * aggregation_temporality describes if the aggregator reports delta changes\n * since last report time, or cumulative changes since a fixed start time.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;\n */\n aggregationTemporality: AggregationTemporality;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ExponentialHistogram.\n * Use `create(ExponentialHistogramSchema)` to create a new message.\n */\nexport const ExponentialHistogramSchema: GenMessage<ExponentialHistogram> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 7);\n\n/**\n * Summary metric data are used to convey quantile summaries,\n * a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)\n * and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)\n * data type. These data points cannot always be merged in a meaningful way.\n * While they can be useful in some applications, histogram data points are\n * recommended for new applications.\n * Summary metrics do not have an aggregation temporality field. This is\n * because the count and sum fields of a SummaryDataPoint are assumed to be\n * cumulative values.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Summary\n */\nexport type Summary = Message<\"opentelemetry.proto.metrics.v1.Summary\"> & {\n /**\n * The time series data points.\n * Note: Multiple time series may be included (same timestamp, different attributes).\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;\n */\n dataPoints: SummaryDataPoint[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Summary.\n * Use `create(SummarySchema)` to create a new message.\n */\nexport const SummarySchema: GenMessage<Summary> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 8);\n\n/**\n * NumberDataPoint is a single data point in a timeseries that describes the\n * time-varying scalar value of a metric.\n *\n * @generated from message opentelemetry.proto.metrics.v1.NumberDataPoint\n */\nexport type NumberDataPoint = Message<\"opentelemetry.proto.metrics.v1.NumberDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * The value itself. A point is considered invalid when one of the recognized\n * value fields is not present inside this oneof.\n *\n * @generated from oneof opentelemetry.proto.metrics.v1.NumberDataPoint.value\n */\n value: {\n /**\n * @generated from field: double as_double = 4;\n */\n value: number;\n case: \"asDouble\";\n } | {\n /**\n * @generated from field: sfixed64 as_int = 6;\n */\n value: bigint;\n case: \"asInt\";\n } | { case: undefined; value?: undefined };\n\n /**\n * (Optional) List of exemplars collected from\n * measurements that were used to form the data point\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;\n */\n exemplars: Exemplar[];\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 8;\n */\n flags: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.NumberDataPoint.\n * Use `create(NumberDataPointSchema)` to create a new message.\n */\nexport const NumberDataPointSchema: GenMessage<NumberDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 9);\n\n/**\n * HistogramDataPoint is a single data point in a timeseries that describes the\n * time-varying values of a Histogram. A Histogram contains summary statistics\n * for a population of values, it may optionally contain the distribution of\n * those values across a set of buckets.\n *\n * If the histogram contains the distribution of values, then both\n * \"explicit_bounds\" and \"bucket counts\" fields must be defined.\n * If the histogram does not contain the distribution of values, then both\n * \"explicit_bounds\" and \"bucket_counts\" must be omitted and only \"count\" and\n * \"sum\" are known.\n *\n * @generated from message opentelemetry.proto.metrics.v1.HistogramDataPoint\n */\nexport type HistogramDataPoint = Message<\"opentelemetry.proto.metrics.v1.HistogramDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * count is the number of values in the population. Must be non-negative. This\n * value must be equal to the sum of the \"count\" fields in buckets if a\n * histogram is provided.\n *\n * @generated from field: fixed64 count = 4;\n */\n count: bigint;\n\n /**\n * sum of the values in the population. If count is zero then this field\n * must be zero.\n *\n * Note: Sum should only be filled out when measuring non-negative discrete\n * events, and is assumed to be monotonic over the values of these events.\n * Negative events *can* be recorded, but sum should not be filled out when\n * doing so. This is specifically to enforce compatibility w/ OpenMetrics,\n * see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram\n *\n * @generated from field: optional double sum = 5;\n */\n sum?: number;\n\n /**\n * bucket_counts is an optional field contains the count values of histogram\n * for each bucket.\n *\n * The sum of the bucket_counts must equal the value in the count field.\n *\n * The number of elements in bucket_counts array must be by one greater than\n * the number of elements in explicit_bounds array. The exception to this rule\n * is when the length of bucket_counts is 0, then the length of explicit_bounds\n * must also be 0.\n *\n * @generated from field: repeated fixed64 bucket_counts = 6;\n */\n bucketCounts: bigint[];\n\n /**\n * explicit_bounds specifies buckets with explicitly defined bounds for values.\n *\n * The boundaries for bucket at index i are:\n *\n * (-infinity, explicit_bounds[i]] for i == 0\n * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)\n * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)\n *\n * The values in the explicit_bounds array must be strictly increasing.\n *\n * Histogram buckets are inclusive of their upper boundary, except the last\n * bucket where the boundary is at infinity. This format is intentionally\n * compatible with the OpenMetrics histogram definition.\n *\n * If bucket_counts length is 0 then explicit_bounds length must also be 0,\n * otherwise the data point is invalid.\n *\n * @generated from field: repeated double explicit_bounds = 7;\n */\n explicitBounds: number[];\n\n /**\n * (Optional) List of exemplars collected from\n * measurements that were used to form the data point\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;\n */\n exemplars: Exemplar[];\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 10;\n */\n flags: number;\n\n /**\n * min is the minimum value over (start_time, end_time].\n *\n * @generated from field: optional double min = 11;\n */\n min?: number;\n\n /**\n * max is the maximum value over (start_time, end_time].\n *\n * @generated from field: optional double max = 12;\n */\n max?: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.HistogramDataPoint.\n * Use `create(HistogramDataPointSchema)` to create a new message.\n */\nexport const HistogramDataPointSchema: GenMessage<HistogramDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 10);\n\n/**\n * ExponentialHistogramDataPoint is a single data point in a timeseries that describes the\n * time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains\n * summary statistics for a population of values, it may optionally contain the\n * distribution of those values across a set of buckets.\n *\n *\n * @generated from message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n */\nexport type ExponentialHistogramDataPoint = Message<\"opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * The number of values in the population. Must be\n * non-negative. This value must be equal to the sum of the \"bucket_counts\"\n * values in the positive and negative Buckets plus the \"zero_count\" field.\n *\n * @generated from field: fixed64 count = 4;\n */\n count: bigint;\n\n /**\n * The sum of the values in the population. If count is zero then this field\n * must be zero.\n *\n * Note: Sum should only be filled out when measuring non-negative discrete\n * events, and is assumed to be monotonic over the values of these events.\n * Negative events *can* be recorded, but sum should not be filled out when\n * doing so. This is specifically to enforce compatibility w/ OpenMetrics,\n * see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram\n *\n * @generated from field: optional double sum = 5;\n */\n sum?: number;\n\n /**\n * scale describes the resolution of the histogram. Boundaries are\n * located at powers of the base, where:\n *\n * base = (2^(2^-scale))\n *\n * The histogram bucket identified by `index`, a signed integer,\n * contains values that are greater than (base^index) and\n * less than or equal to (base^(index+1)).\n *\n * The positive and negative ranges of the histogram are expressed\n * separately. Negative values are mapped by their absolute value\n * into the negative range using the same scale as the positive range.\n *\n * scale is not restricted by the protocol, as the permissible\n * values depend on the range of the data.\n *\n * @generated from field: sint32 scale = 6;\n */\n scale: number;\n\n /**\n * The count of values that are either exactly zero or\n * within the region considered zero by the instrumentation at the\n * tolerated degree of precision. This bucket stores values that\n * cannot be expressed using the standard exponential formula as\n * well as values that have been rounded to zero.\n *\n * Implementations MAY consider the zero bucket to have probability\n * mass equal to (zero_count / count).\n *\n * @generated from field: fixed64 zero_count = 7;\n */\n zeroCount: bigint;\n\n /**\n * positive carries the positive range of exponential bucket counts.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;\n */\n positive?: ExponentialHistogramDataPoint_Buckets;\n\n /**\n * negative carries the negative range of exponential bucket counts.\n *\n * @generated from field: opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;\n */\n negative?: ExponentialHistogramDataPoint_Buckets;\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 10;\n */\n flags: number;\n\n /**\n * (Optional) List of exemplars collected from\n * measurements that were used to form the data point\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;\n */\n exemplars: Exemplar[];\n\n /**\n * The minimum value over (start_time, end_time].\n *\n * @generated from field: optional double min = 12;\n */\n min?: number;\n\n /**\n * The maximum value over (start_time, end_time].\n *\n * @generated from field: optional double max = 13;\n */\n max?: number;\n\n /**\n * ZeroThreshold may be optionally set to convey the width of the zero\n * region. Where the zero region is defined as the closed interval\n * [-ZeroThreshold, ZeroThreshold].\n * When ZeroThreshold is 0, zero count bucket stores values that cannot be\n * expressed using the standard exponential formula as well as values that\n * have been rounded to zero.\n *\n * @generated from field: double zero_threshold = 14;\n */\n zeroThreshold: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.\n * Use `create(ExponentialHistogramDataPointSchema)` to create a new message.\n */\nexport const ExponentialHistogramDataPointSchema: GenMessage<ExponentialHistogramDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 11);\n\n/**\n * Buckets are a set of bucket counts, encoded in a contiguous array\n * of counts.\n *\n * @generated from message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n */\nexport type ExponentialHistogramDataPoint_Buckets = Message<\"opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\"> & {\n /**\n * The bucket index of the first entry in the bucket_counts array.\n *\n * Note: This uses a varint encoding as a simple form of compression.\n *\n * @generated from field: sint32 offset = 1;\n */\n offset: number;\n\n /**\n * An array of count values, where bucket_counts[i] carries\n * the count of the bucket at index (offset+i). bucket_counts[i] is the count\n * of values greater than base^(offset+i) and less than or equal to\n * base^(offset+i+1).\n *\n * Note: By contrast, the explicit HistogramDataPoint uses\n * fixed64. This field is expected to have many buckets,\n * especially zeros, so uint64 has been selected to ensure\n * varint encoding.\n *\n * @generated from field: repeated uint64 bucket_counts = 2;\n */\n bucketCounts: bigint[];\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.\n * Use `create(ExponentialHistogramDataPoint_BucketsSchema)` to create a new message.\n */\nexport const ExponentialHistogramDataPoint_BucketsSchema: GenMessage<ExponentialHistogramDataPoint_Buckets> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 11, 0);\n\n/**\n * SummaryDataPoint is a single data point in a timeseries that describes the\n * time-varying values of a Summary metric. The count and sum fields represent\n * cumulative values.\n *\n * @generated from message opentelemetry.proto.metrics.v1.SummaryDataPoint\n */\nexport type SummaryDataPoint = Message<\"opentelemetry.proto.metrics.v1.SummaryDataPoint\"> & {\n /**\n * The set of key/value pairs that uniquely identify the timeseries from\n * where this point belongs. The list may be empty (may contain 0 elements).\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;\n */\n attributes: KeyValue[];\n\n /**\n * StartTimeUnixNano is optional but strongly encouraged, see the\n * the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 start_time_unix_nano = 2;\n */\n startTimeUnixNano: bigint;\n\n /**\n * TimeUnixNano is required, see the detailed comments above Metric.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 3;\n */\n timeUnixNano: bigint;\n\n /**\n * count is the number of values in the population. Must be non-negative.\n *\n * @generated from field: fixed64 count = 4;\n */\n count: bigint;\n\n /**\n * sum of the values in the population. If count is zero then this field\n * must be zero.\n *\n * Note: Sum should only be filled out when measuring non-negative discrete\n * events, and is assumed to be monotonic over the values of these events.\n * Negative events *can* be recorded, but sum should not be filled out when\n * doing so. This is specifically to enforce compatibility w/ OpenMetrics,\n * see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary\n *\n * @generated from field: double sum = 5;\n */\n sum: number;\n\n /**\n * (Optional) list of values at different quantiles of the distribution calculated\n * from the current snapshot. The quantiles must be strictly increasing.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;\n */\n quantileValues: SummaryDataPoint_ValueAtQuantile[];\n\n /**\n * Flags that apply to this specific data point. See DataPointFlags\n * for the available flags and their meaning.\n *\n * @generated from field: uint32 flags = 8;\n */\n flags: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.SummaryDataPoint.\n * Use `create(SummaryDataPointSchema)` to create a new message.\n */\nexport const SummaryDataPointSchema: GenMessage<SummaryDataPoint> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 12);\n\n/**\n * Represents the value at a given quantile of a distribution.\n *\n * To record Min and Max values following conventions are used:\n * - The 1.0 quantile is equivalent to the maximum value observed.\n * - The 0.0 quantile is equivalent to the minimum value observed.\n *\n * See the following issue for more context:\n * https://github.com/open-telemetry/opentelemetry-proto/issues/125\n *\n * @generated from message opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n */\nexport type SummaryDataPoint_ValueAtQuantile = Message<\"opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\"> & {\n /**\n * The quantile of a distribution. Must be in the interval\n * [0.0, 1.0].\n *\n * @generated from field: double quantile = 1;\n */\n quantile: number;\n\n /**\n * The value at the given quantile of a distribution.\n *\n * Quantile values must NOT be negative.\n *\n * @generated from field: double value = 2;\n */\n value: number;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.\n * Use `create(SummaryDataPoint_ValueAtQuantileSchema)` to create a new message.\n */\nexport const SummaryDataPoint_ValueAtQuantileSchema: GenMessage<SummaryDataPoint_ValueAtQuantile> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 12, 0);\n\n/**\n * A representation of an exemplar, which is a sample input measurement.\n * Exemplars also hold information about the environment when the measurement\n * was recorded, for example the span and trace ID of the active span when the\n * exemplar was recorded.\n *\n * @generated from message opentelemetry.proto.metrics.v1.Exemplar\n */\nexport type Exemplar = Message<\"opentelemetry.proto.metrics.v1.Exemplar\"> & {\n /**\n * The set of key/value pairs that were filtered out by the aggregator, but\n * recorded alongside the original measurement. Only key/value pairs that were\n * filtered out by the aggregator should be included\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;\n */\n filteredAttributes: KeyValue[];\n\n /**\n * time_unix_nano is the exact time when this exemplar was recorded\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January\n * 1970.\n *\n * @generated from field: fixed64 time_unix_nano = 2;\n */\n timeUnixNano: bigint;\n\n /**\n * The value of the measurement that was recorded. An exemplar is\n * considered invalid when one of the recognized value fields is not present\n * inside this oneof.\n *\n * @generated from oneof opentelemetry.proto.metrics.v1.Exemplar.value\n */\n value: {\n /**\n * @generated from field: double as_double = 3;\n */\n value: number;\n case: \"asDouble\";\n } | {\n /**\n * @generated from field: sfixed64 as_int = 6;\n */\n value: bigint;\n case: \"asInt\";\n } | { case: undefined; value?: undefined };\n\n /**\n * (Optional) Span ID of the exemplar trace.\n * span_id may be missing if the measurement is not recorded inside a trace\n * or if the trace is not sampled.\n *\n * @generated from field: bytes span_id = 4;\n */\n spanId: Uint8Array;\n\n /**\n * (Optional) Trace ID of the exemplar trace.\n * trace_id may be missing if the measurement is not recorded inside a trace\n * or if the trace is not sampled.\n *\n * @generated from field: bytes trace_id = 5;\n */\n traceId: Uint8Array;\n};\n\n/**\n * Describes the message opentelemetry.proto.metrics.v1.Exemplar.\n * Use `create(ExemplarSchema)` to create a new message.\n */\nexport const ExemplarSchema: GenMessage<Exemplar> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_metrics_v1_metrics, 13);\n\n/**\n * AggregationTemporality defines how a metric aggregator reports aggregated\n * values. It describes how those values relate to the time interval over\n * which they are aggregated.\n *\n * @generated from enum opentelemetry.proto.metrics.v1.AggregationTemporality\n */\nexport enum AggregationTemporality {\n /**\n * UNSPECIFIED is the default AggregationTemporality, it MUST not be used.\n *\n * @generated from enum value: AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * DELTA is an AggregationTemporality for a metric aggregator which reports\n * changes since last report time. Successive metrics contain aggregation of\n * values from continuous and non-overlapping intervals.\n *\n * The values for a DELTA metric are based only on the time interval\n * associated with one measurement cycle. There is no dependency on\n * previous measurements like is the case for CUMULATIVE metrics.\n *\n * For example, consider a system measuring the number of requests that\n * it receives and reports the sum of these requests every second as a\n * DELTA metric:\n *\n * 1. The system starts receiving at time=t_0.\n * 2. A request is received, the system measures 1 request.\n * 3. A request is received, the system measures 1 request.\n * 4. A request is received, the system measures 1 request.\n * 5. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0 to\n * t_0+1 with a value of 3.\n * 6. A request is received, the system measures 1 request.\n * 7. A request is received, the system measures 1 request.\n * 8. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0+1 to\n * t_0+2 with a value of 2.\n *\n * @generated from enum value: AGGREGATION_TEMPORALITY_DELTA = 1;\n */\n DELTA = 1,\n\n /**\n * CUMULATIVE is an AggregationTemporality for a metric aggregator which\n * reports changes since a fixed start time. This means that current values\n * of a CUMULATIVE metric depend on all previous measurements since the\n * start time. Because of this, the sender is required to retain this state\n * in some form. If this state is lost or invalidated, the CUMULATIVE metric\n * values MUST be reset and a new fixed start time following the last\n * reported measurement time sent MUST be used.\n *\n * For example, consider a system measuring the number of requests that\n * it receives and reports the sum of these requests every second as a\n * CUMULATIVE metric:\n *\n * 1. The system starts receiving at time=t_0.\n * 2. A request is received, the system measures 1 request.\n * 3. A request is received, the system measures 1 request.\n * 4. A request is received, the system measures 1 request.\n * 5. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0 to\n * t_0+1 with a value of 3.\n * 6. A request is received, the system measures 1 request.\n * 7. A request is received, the system measures 1 request.\n * 8. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_0 to\n * t_0+2 with a value of 5.\n * 9. The system experiences a fault and loses state.\n * 10. The system recovers and resumes receiving at time=t_1.\n * 11. A request is received, the system measures 1 request.\n * 12. The 1 second collection cycle ends. A metric is exported for the\n * number of requests received over the interval of time t_1 to\n * t_0+1 with a value of 1.\n *\n * Note: Even though, when reporting changes since last report time, using\n * CUMULATIVE is valid, it is not recommended. This may cause problems for\n * systems that do not use start_time to determine when the aggregation\n * value was reset (e.g. Prometheus).\n *\n * @generated from enum value: AGGREGATION_TEMPORALITY_CUMULATIVE = 2;\n */\n CUMULATIVE = 2,\n}\n\n/**\n * Describes the enum opentelemetry.proto.metrics.v1.AggregationTemporality.\n */\nexport const AggregationTemporalitySchema: GenEnum<AggregationTemporality> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_metrics_v1_metrics, 0);\n\n/**\n * DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a\n * bit-field representing 32 distinct boolean flags. Each flag defined in this\n * enum is a bit-mask. To test the presence of a single flag in the flags of\n * a data point, for example, use an expression like:\n *\n * (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK\n *\n *\n * @generated from enum opentelemetry.proto.metrics.v1.DataPointFlags\n */\nexport enum DataPointFlags {\n /**\n * The zero value for the enum. Should not be used for comparisons.\n * Instead use bitwise \"and\" with the appropriate mask as shown above.\n *\n * @generated from enum value: DATA_POINT_FLAGS_DO_NOT_USE = 0;\n */\n DO_NOT_USE = 0,\n\n /**\n * This DataPoint is valid but has no recorded value. This value\n * SHOULD be used to reflect explicitly missing data in a series, as\n * for an equivalent to the Prometheus \"staleness marker\".\n *\n * @generated from enum value: DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1;\n */\n NO_RECORDED_VALUE_MASK = 1,\n}\n\n/**\n * Describes the enum opentelemetry.proto.metrics.v1.DataPointFlags.\n */\nexport const DataPointFlagsSchema: GenEnum<DataPointFlags> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_metrics_v1_metrics, 1);\n\n","// Copyright 2019, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/collector/metrics/v1/metrics_service.proto (package opentelemetry.proto.collector.metrics.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { ResourceMetrics } from \"../../../metrics/v1/metrics_pb.js\";\nimport { file_opentelemetry_proto_metrics_v1_metrics } from \"../../../metrics/v1/metrics_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/collector/metrics/v1/metrics_service.proto.\n */\nexport const file_opentelemetry_proto_collector_metrics_v1_metrics_service: GenFile = /*@__PURE__*/\n fileDesc(\"Cj5vcGVudGVsZW1ldHJ5L3Byb3RvL2NvbGxlY3Rvci9tZXRyaWNzL3YxL21ldHJpY3Nfc2VydmljZS5wcm90bxIob3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubWV0cmljcy52MSJoChtFeHBvcnRNZXRyaWNzU2VydmljZVJlcXVlc3QSSQoQcmVzb3VyY2VfbWV0cmljcxgBIAMoCzIvLm9wZW50ZWxlbWV0cnkucHJvdG8ubWV0cmljcy52MS5SZXNvdXJjZU1ldHJpY3MifgocRXhwb3J0TWV0cmljc1NlcnZpY2VSZXNwb25zZRJeCg9wYXJ0aWFsX3N1Y2Nlc3MYASABKAsyRS5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci5tZXRyaWNzLnYxLkV4cG9ydE1ldHJpY3NQYXJ0aWFsU3VjY2VzcyJSChtFeHBvcnRNZXRyaWNzUGFydGlhbFN1Y2Nlc3MSHAoUcmVqZWN0ZWRfZGF0YV9wb2ludHMYASABKAMSFQoNZXJyb3JfbWVzc2FnZRgCIAEoCTKsAQoOTWV0cmljc1NlcnZpY2USmQEKBkV4cG9ydBJFLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLm1ldHJpY3MudjEuRXhwb3J0TWV0cmljc1NlcnZpY2VSZXF1ZXN0GkYub3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubWV0cmljcy52MS5FeHBvcnRNZXRyaWNzU2VydmljZVJlc3BvbnNlIgBCpAEKK2lvLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLm1ldHJpY3MudjFCE01ldHJpY3NTZXJ2aWNlUHJvdG9QAVozZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2NvbGxlY3Rvci9tZXRyaWNzL3YxqgIoT3BlblRlbGVtZXRyeS5Qcm90by5Db2xsZWN0b3IuTWV0cmljcy5WMWIGcHJvdG8z\", [file_opentelemetry_proto_metrics_v1_metrics]);\n\n/**\n * @generated from message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n */\nexport type ExportMetricsServiceRequest = Message<\"opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\"> & {\n /**\n * An array of ResourceMetrics.\n * For data coming from a single resource this array will typically contain one\n * element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n * data from multiple origins typically batch the data before forwarding further and\n * in that case this array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;\n */\n resourceMetrics: ResourceMetrics[];\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.\n * Use `create(ExportMetricsServiceRequestSchema)` to create a new message.\n */\nexport const ExportMetricsServiceRequestSchema: GenMessage<ExportMetricsServiceRequest> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 0);\n\n/**\n * @generated from message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n */\nexport type ExportMetricsServiceResponse = Message<\"opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"> & {\n /**\n * The details of a partially successful export request.\n *\n * If the request is only partially accepted\n * (i.e. when the server accepts only parts of the data and rejects the rest)\n * the server MUST initialize the `partial_success` field and MUST\n * set the `rejected_<signal>` with the number of items it rejected.\n *\n * Servers MAY also make use of the `partial_success` field to convey\n * warnings/suggestions to senders even when the request was fully accepted.\n * In such cases, the `rejected_<signal>` MUST have a value of `0` and\n * the `error_message` MUST be non-empty.\n *\n * A `partial_success` message with an empty value (rejected_<signal> = 0 and\n * `error_message` = \"\") is equivalent to it not being set/present. Senders\n * SHOULD interpret it the same way as in the full success case.\n *\n * @generated from field: opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;\n */\n partialSuccess?: ExportMetricsPartialSuccess;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.\n * Use `create(ExportMetricsServiceResponseSchema)` to create a new message.\n */\nexport const ExportMetricsServiceResponseSchema: GenMessage<ExportMetricsServiceResponse> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 1);\n\n/**\n * @generated from message opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n */\nexport type ExportMetricsPartialSuccess = Message<\"opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\"> & {\n /**\n * The number of rejected data points.\n *\n * A `rejected_<signal>` field holding a `0` value indicates that the\n * request was fully accepted.\n *\n * @generated from field: int64 rejected_data_points = 1;\n */\n rejectedDataPoints: bigint;\n\n /**\n * A developer-facing human-readable message in English. It should be used\n * either to explain why the server rejected parts of the data during a partial\n * success or to convey warnings/suggestions during a full success. The message\n * should offer guidance on how users can address such issues.\n *\n * error_message is an optional field. An error_message with an empty value\n * is equivalent to it not being set.\n *\n * @generated from field: string error_message = 2;\n */\n errorMessage: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.\n * Use `create(ExportMetricsPartialSuccessSchema)` to create a new message.\n */\nexport const ExportMetricsPartialSuccessSchema: GenMessage<ExportMetricsPartialSuccess> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 2);\n\n/**\n * Service that can be used to push metrics between one Application\n * instrumented with OpenTelemetry and a collector, or between a collector and a\n * central collector.\n *\n * @generated from service opentelemetry.proto.collector.metrics.v1.MetricsService\n */\nexport const MetricsService: GenService<{\n /**\n * @generated from rpc opentelemetry.proto.collector.metrics.v1.MetricsService.Export\n */\n export: {\n methodKind: \"unary\";\n input: typeof ExportMetricsServiceRequestSchema;\n output: typeof ExportMetricsServiceResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_opentelemetry_proto_collector_metrics_v1_metrics_service, 0);\n\n","// Copyright 2020, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/logs/v1/logs.proto (package opentelemetry.proto.logs.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { AnyValue, InstrumentationScope, KeyValue } from \"../../common/v1/common_pb.js\";\nimport { file_opentelemetry_proto_common_v1_common } from \"../../common/v1/common_pb.js\";\nimport type { Resource } from \"../../resource/v1/resource_pb.js\";\nimport { file_opentelemetry_proto_resource_v1_resource } from \"../../resource/v1/resource_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/logs/v1/logs.proto.\n */\nexport const file_opentelemetry_proto_logs_v1_logs: GenFile = /*@__PURE__*/\n fileDesc(\"CiZvcGVudGVsZW1ldHJ5L3Byb3RvL2xvZ3MvdjEvbG9ncy5wcm90bxIbb3BlbnRlbGVtZXRyeS5wcm90by5sb2dzLnYxIkwKCExvZ3NEYXRhEkAKDXJlc291cmNlX2xvZ3MYASADKAsyKS5vcGVudGVsZW1ldHJ5LnByb3RvLmxvZ3MudjEuUmVzb3VyY2VMb2dzIqMBCgxSZXNvdXJjZUxvZ3MSOwoIcmVzb3VyY2UYASABKAsyKS5vcGVudGVsZW1ldHJ5LnByb3RvLnJlc291cmNlLnYxLlJlc291cmNlEjoKCnNjb3BlX2xvZ3MYAiADKAsyJi5vcGVudGVsZW1ldHJ5LnByb3RvLmxvZ3MudjEuU2NvcGVMb2dzEhIKCnNjaGVtYV91cmwYAyABKAlKBgjoBxDpByKgAQoJU2NvcGVMb2dzEkIKBXNjb3BlGAEgASgLMjMub3BlbnRlbGVtZXRyeS5wcm90by5jb21tb24udjEuSW5zdHJ1bWVudGF0aW9uU2NvcGUSOwoLbG9nX3JlY29yZHMYAiADKAsyJi5vcGVudGVsZW1ldHJ5LnByb3RvLmxvZ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U0VWRVJJVFlfTlVNQkVSX1dBUk4QDRIZChVTRVZFUklUWV9OVU1CRVJfV0FSTjIQDhIZChVTRVZFUklUWV9OVU1CRVJfV0FSTjMQDxIZChVTRVZFUklUWV9OVU1CRVJfV0FSTjQQEBIZChVTRVZFUklUWV9OVU1CRVJfRVJST1IQERIaChZTRVZFUklUWV9OVU1CRVJfRVJST1IyEBISGgoWU0VWRVJJVFlfTlVNQkVSX0VSUk9SMxATEhoKFlNFVkVSSVRZX05VTUJFUl9FUlJPUjQQFBIZChVTRVZFUklUWV9OVU1CRVJfRkFUQUwQFRIaChZTRVZFUklUWV9OVU1CRVJfRkFUQUwyEBYSGgoWU0VWRVJJVFlfTlVNQkVSX0ZBVEFMMxAXEhoKFlNFVkVSSVRZX05VTUJFUl9GQVRBTDQQGCpZCg5Mb2dSZWNvcmRGbGFncxIfChtMT0dfUkVDT1JEX0ZMQUdTX0RPX05PVF9VU0UQABImCiFMT0dfUkVDT1JEX0ZMQUdTX1RSQUNFX0ZMQUdTX01BU0sQ/wFCcwoeaW8ub3BlbnRlbGVtZXRyeS5wcm90by5sb2dzLnYxQglMb2dzUHJvdG9QAVomZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2xvZ3MvdjGqAhtPcGVuVGVsZW1ldHJ5LlByb3RvLkxvZ3MuVjFiBnByb3RvMw\", [file_opentelemetry_proto_common_v1_common, file_opentelemetry_proto_resource_v1_resource]);\n\n/**\n * LogsData represents the logs data that can be stored in a persistent storage,\n * OR can be embedded by other protocols that transfer OTLP logs data but do not\n * implement the OTLP protocol.\n *\n * The main difference between this message and collector protocol is that\n * in this message there will not be any \"control\" or \"metadata\" specific to\n * OTLP protocol.\n *\n * When new fields are added into this message, the OTLP request MUST be updated\n * as well.\n *\n * @generated from message opentelemetry.proto.logs.v1.LogsData\n */\nexport type LogsData = Message<\"opentelemetry.proto.logs.v1.LogsData\"> & {\n /**\n * An array of ResourceLogs.\n * For data coming from a single resource this array will typically contain\n * one element. Intermediary nodes that receive data from multiple origins\n * typically batch the data before forwarding further and in that case this\n * array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;\n */\n resourceLogs: ResourceLogs[];\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.LogsData.\n * Use `create(LogsDataSchema)` to create a new message.\n */\nexport const LogsDataSchema: GenMessage<LogsData> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 0);\n\n/**\n * A collection of ScopeLogs from a Resource.\n *\n * @generated from message opentelemetry.proto.logs.v1.ResourceLogs\n */\nexport type ResourceLogs = Message<\"opentelemetry.proto.logs.v1.ResourceLogs\"> & {\n /**\n * The resource for the logs in this message.\n * If this field is not set then resource info is unknown.\n *\n * @generated from field: opentelemetry.proto.resource.v1.Resource resource = 1;\n */\n resource?: Resource;\n\n /**\n * A list of ScopeLogs that originate from a resource.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;\n */\n scopeLogs: ScopeLogs[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the resource data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"resource\" field. It does not apply\n * to the data in the \"scope_logs\" field which have their own schema_url field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.ResourceLogs.\n * Use `create(ResourceLogsSchema)` to create a new message.\n */\nexport const ResourceLogsSchema: GenMessage<ResourceLogs> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 1);\n\n/**\n * A collection of Logs produced by a Scope.\n *\n * @generated from message opentelemetry.proto.logs.v1.ScopeLogs\n */\nexport type ScopeLogs = Message<\"opentelemetry.proto.logs.v1.ScopeLogs\"> & {\n /**\n * The instrumentation scope information for the logs in this message.\n * Semantically when InstrumentationScope isn't set, it is equivalent with\n * an empty instrumentation scope name (unknown).\n *\n * @generated from field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1;\n */\n scope?: InstrumentationScope;\n\n /**\n * A list of log records.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.LogRecord log_records = 2;\n */\n logRecords: LogRecord[];\n\n /**\n * The Schema URL, if known. This is the identifier of the Schema that the log data\n * is recorded in. Notably, the last part of the URL path is the version number of the\n * schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see\n * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n * This schema_url applies to the data in the \"scope\" field and all logs in the\n * \"log_records\" field.\n *\n * @generated from field: string schema_url = 3;\n */\n schemaUrl: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.ScopeLogs.\n * Use `create(ScopeLogsSchema)` to create a new message.\n */\nexport const ScopeLogsSchema: GenMessage<ScopeLogs> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 2);\n\n/**\n * A log record according to OpenTelemetry Log Data Model:\n * https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md\n *\n * @generated from message opentelemetry.proto.logs.v1.LogRecord\n */\nexport type LogRecord = Message<\"opentelemetry.proto.logs.v1.LogRecord\"> & {\n /**\n * time_unix_nano is the time when the event occurred.\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n * Value of 0 indicates unknown or missing timestamp.\n *\n * @generated from field: fixed64 time_unix_nano = 1;\n */\n timeUnixNano: bigint;\n\n /**\n * Time when the event was observed by the collection system.\n * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)\n * this timestamp is typically set at the generation time and is equal to Timestamp.\n * For events originating externally and collected by OpenTelemetry (e.g. using\n * Collector) this is the time when OpenTelemetry's code observed the event measured\n * by the clock of the OpenTelemetry code. This field MUST be set once the event is\n * observed by OpenTelemetry.\n *\n * For converting OpenTelemetry log data to formats that support only one timestamp or\n * when receiving OpenTelemetry log data by recipients that support only one timestamp\n * internally the following logic is recommended:\n * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.\n *\n * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n * Value of 0 indicates unknown or missing timestamp.\n *\n * @generated from field: fixed64 observed_time_unix_nano = 11;\n */\n observedTimeUnixNano: bigint;\n\n /**\n * Numerical value of the severity, normalized to values described in Log Data Model.\n * [Optional].\n *\n * @generated from field: opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;\n */\n severityNumber: SeverityNumber;\n\n /**\n * The severity text (also known as log level). The original string representation as\n * it is known at the source. [Optional].\n *\n * @generated from field: string severity_text = 3;\n */\n severityText: string;\n\n /**\n * A value containing the body of the log record. Can be for example a human-readable\n * string message (including multi-line) describing the event in a free form or it can\n * be a structured data composed of arrays and maps of other values. [Optional].\n *\n * @generated from field: opentelemetry.proto.common.v1.AnyValue body = 5;\n */\n body?: AnyValue;\n\n /**\n * Additional attributes that describe the specific event occurrence. [Optional].\n * Attribute keys MUST be unique (it is not allowed to have more than one\n * attribute with the same key).\n * The behavior of software that receives duplicated keys can be unpredictable.\n *\n * @generated from field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 6;\n */\n attributes: KeyValue[];\n\n /**\n * @generated from field: uint32 dropped_attributes_count = 7;\n */\n droppedAttributesCount: number;\n\n /**\n * Flags, a bit field. 8 least significant bits are the trace flags as\n * defined in W3C Trace Context specification. 24 most significant bits are reserved\n * and must be set to 0. Readers must not assume that 24 most significant bits\n * will be zero and must correctly mask the bits when reading 8-bit trace flag (use\n * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].\n *\n * @generated from field: fixed32 flags = 8;\n */\n flags: number;\n\n /**\n * A unique identifier for a trace. All logs from the same trace share\n * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\n * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is optional.\n *\n * The receivers SHOULD assume that the log record is not associated with a\n * trace if any of the following is true:\n * - the field is not present,\n * - the field contains an invalid value.\n *\n * @generated from field: bytes trace_id = 9;\n */\n traceId: Uint8Array;\n\n /**\n * A unique identifier for a span within a trace, assigned when the span\n * is created. The ID is an 8-byte array. An ID with all zeroes OR of length\n * other than 8 bytes is considered invalid (empty string in OTLP/JSON\n * is zero-length and thus is also invalid).\n *\n * This field is optional. If the sender specifies a valid span_id then it SHOULD also\n * specify a valid trace_id.\n *\n * The receivers SHOULD assume that the log record is not associated with a\n * span if any of the following is true:\n * - the field is not present,\n * - the field contains an invalid value.\n *\n * @generated from field: bytes span_id = 10;\n */\n spanId: Uint8Array;\n\n /**\n * A unique identifier of event category/type.\n * All events with the same event_name are expected to conform to the same\n * schema for both their attributes and their body.\n *\n * Recommended to be fully qualified and short (no longer than 256 characters).\n *\n * Presence of event_name on the log record identifies this record\n * as an event.\n *\n * [Optional].\n *\n * @generated from field: string event_name = 12;\n */\n eventName: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.logs.v1.LogRecord.\n * Use `create(LogRecordSchema)` to create a new message.\n */\nexport const LogRecordSchema: GenMessage<LogRecord> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_logs_v1_logs, 3);\n\n/**\n * Possible values for LogRecord.SeverityNumber.\n *\n * @generated from enum opentelemetry.proto.logs.v1.SeverityNumber\n */\nexport enum SeverityNumber {\n /**\n * UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.\n *\n * @generated from enum value: SEVERITY_NUMBER_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE = 1;\n */\n TRACE = 1,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE2 = 2;\n */\n TRACE2 = 2,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE3 = 3;\n */\n TRACE3 = 3,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_TRACE4 = 4;\n */\n TRACE4 = 4,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG = 5;\n */\n DEBUG = 5,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG2 = 6;\n */\n DEBUG2 = 6,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG3 = 7;\n */\n DEBUG3 = 7,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_DEBUG4 = 8;\n */\n DEBUG4 = 8,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO = 9;\n */\n INFO = 9,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO2 = 10;\n */\n INFO2 = 10,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO3 = 11;\n */\n INFO3 = 11,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_INFO4 = 12;\n */\n INFO4 = 12,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN = 13;\n */\n WARN = 13,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN2 = 14;\n */\n WARN2 = 14,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN3 = 15;\n */\n WARN3 = 15,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_WARN4 = 16;\n */\n WARN4 = 16,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR = 17;\n */\n ERROR = 17,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR2 = 18;\n */\n ERROR2 = 18,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR3 = 19;\n */\n ERROR3 = 19,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_ERROR4 = 20;\n */\n ERROR4 = 20,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL = 21;\n */\n FATAL = 21,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL2 = 22;\n */\n FATAL2 = 22,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL3 = 23;\n */\n FATAL3 = 23,\n\n /**\n * @generated from enum value: SEVERITY_NUMBER_FATAL4 = 24;\n */\n FATAL4 = 24,\n}\n\n/**\n * Describes the enum opentelemetry.proto.logs.v1.SeverityNumber.\n */\nexport const SeverityNumberSchema: GenEnum<SeverityNumber> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_logs_v1_logs, 0);\n\n/**\n * LogRecordFlags represents constants used to interpret the\n * LogRecord.flags field, which is protobuf 'fixed32' type and is to\n * be used as bit-fields. Each non-zero value defined in this enum is\n * a bit-mask. To extract the bit-field, for example, use an\n * expression like:\n *\n * (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)\n *\n *\n * @generated from enum opentelemetry.proto.logs.v1.LogRecordFlags\n */\nexport enum LogRecordFlags {\n /**\n * The zero value for the enum. Should not be used for comparisons.\n * Instead use bitwise \"and\" with the appropriate mask as shown above.\n *\n * @generated from enum value: LOG_RECORD_FLAGS_DO_NOT_USE = 0;\n */\n DO_NOT_USE = 0,\n\n /**\n * Bits 0-7 are used for trace flags.\n *\n * @generated from enum value: LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;\n */\n TRACE_FLAGS_MASK = 255,\n}\n\n/**\n * Describes the enum opentelemetry.proto.logs.v1.LogRecordFlags.\n */\nexport const LogRecordFlagsSchema: GenEnum<LogRecordFlags> = /*@__PURE__*/\n enumDesc(file_opentelemetry_proto_logs_v1_logs, 1);\n\n","// Copyright 2020, OpenTelemetry Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file opentelemetry/proto/collector/logs/v1/logs_service.proto (package opentelemetry.proto.collector.logs.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { ResourceLogs } from \"../../../logs/v1/logs_pb.js\";\nimport { file_opentelemetry_proto_logs_v1_logs } from \"../../../logs/v1/logs_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file opentelemetry/proto/collector/logs/v1/logs_service.proto.\n */\nexport const file_opentelemetry_proto_collector_logs_v1_logs_service: GenFile = /*@__PURE__*/\n fileDesc(\"CjhvcGVudGVsZW1ldHJ5L3Byb3RvL2NvbGxlY3Rvci9sb2dzL3YxL2xvZ3Nfc2VydmljZS5wcm90bxIlb3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubG9ncy52MSJcChhFeHBvcnRMb2dzU2VydmljZVJlcXVlc3QSQAoNcmVzb3VyY2VfbG9ncxgBIAMoCzIpLm9wZW50ZWxlbWV0cnkucHJvdG8ubG9ncy52MS5SZXNvdXJjZUxvZ3MidQoZRXhwb3J0TG9nc1NlcnZpY2VSZXNwb25zZRJYCg9wYXJ0aWFsX3N1Y2Nlc3MYASABKAsyPy5vcGVudGVsZW1ldHJ5LnByb3RvLmNvbGxlY3Rvci5sb2dzLnYxLkV4cG9ydExvZ3NQYXJ0aWFsU3VjY2VzcyJPChhFeHBvcnRMb2dzUGFydGlhbFN1Y2Nlc3MSHAoUcmVqZWN0ZWRfbG9nX3JlY29yZHMYASABKAMSFQoNZXJyb3JfbWVzc2FnZRgCIAEoCTKdAQoLTG9nc1NlcnZpY2USjQEKBkV4cG9ydBI/Lm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLmxvZ3MudjEuRXhwb3J0TG9nc1NlcnZpY2VSZXF1ZXN0GkAub3BlbnRlbGVtZXRyeS5wcm90by5jb2xsZWN0b3IubG9ncy52MS5FeHBvcnRMb2dzU2VydmljZVJlc3BvbnNlIgBCmAEKKGlvLm9wZW50ZWxlbWV0cnkucHJvdG8uY29sbGVjdG9yLmxvZ3MudjFCEExvZ3NTZXJ2aWNlUHJvdG9QAVowZ28ub3BlbnRlbGVtZXRyeS5pby9wcm90by9vdGxwL2NvbGxlY3Rvci9sb2dzL3YxqgIlT3BlblRlbGVtZXRyeS5Qcm90by5Db2xsZWN0b3IuTG9ncy5WMWIGcHJvdG8z\", [file_opentelemetry_proto_logs_v1_logs]);\n\n/**\n * @generated from message opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n */\nexport type ExportLogsServiceRequest = Message<\"opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\"> & {\n /**\n * An array of ResourceLogs.\n * For data coming from a single resource this array will typically contain one\n * element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n * data from multiple origins typically batch the data before forwarding further and\n * in that case this array will contain multiple elements.\n *\n * @generated from field: repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;\n */\n resourceLogs: ResourceLogs[];\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.\n * Use `create(ExportLogsServiceRequestSchema)` to create a new message.\n */\nexport const ExportLogsServiceRequestSchema: GenMessage<ExportLogsServiceRequest> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 0);\n\n/**\n * @generated from message opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n */\nexport type ExportLogsServiceResponse = Message<\"opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\"> & {\n /**\n * The details of a partially successful export request.\n *\n * If the request is only partially accepted\n * (i.e. when the server accepts only parts of the data and rejects the rest)\n * the server MUST initialize the `partial_success` field and MUST\n * set the `rejected_<signal>` with the number of items it rejected.\n *\n * Servers MAY also make use of the `partial_success` field to convey\n * warnings/suggestions to senders even when the request was fully accepted.\n * In such cases, the `rejected_<signal>` MUST have a value of `0` and\n * the `error_message` MUST be non-empty.\n *\n * A `partial_success` message with an empty value (rejected_<signal> = 0 and\n * `error_message` = \"\") is equivalent to it not being set/present. Senders\n * SHOULD interpret it the same way as in the full success case.\n *\n * @generated from field: opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;\n */\n partialSuccess?: ExportLogsPartialSuccess;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.\n * Use `create(ExportLogsServiceResponseSchema)` to create a new message.\n */\nexport const ExportLogsServiceResponseSchema: GenMessage<ExportLogsServiceResponse> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 1);\n\n/**\n * @generated from message opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n */\nexport type ExportLogsPartialSuccess = Message<\"opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\"> & {\n /**\n * The number of rejected log records.\n *\n * A `rejected_<signal>` field holding a `0` value indicates that the\n * request was fully accepted.\n *\n * @generated from field: int64 rejected_log_records = 1;\n */\n rejectedLogRecords: bigint;\n\n /**\n * A developer-facing human-readable message in English. It should be used\n * either to explain why the server rejected parts of the data during a partial\n * success or to convey warnings/suggestions during a full success. The message\n * should offer guidance on how users can address such issues.\n *\n * error_message is an optional field. An error_message with an empty value\n * is equivalent to it not being set.\n *\n * @generated from field: string error_message = 2;\n */\n errorMessage: string;\n};\n\n/**\n * Describes the message opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.\n * Use `create(ExportLogsPartialSuccessSchema)` to create a new message.\n */\nexport const ExportLogsPartialSuccessSchema: GenMessage<ExportLogsPartialSuccess> = /*@__PURE__*/\n messageDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 2);\n\n/**\n * Service that can be used to push logs between one Application instrumented with\n * OpenTelemetry and an collector, or between an collector and a central collector (in this\n * case logs are sent/received to/from multiple Applications).\n *\n * @generated from service opentelemetry.proto.collector.logs.v1.LogsService\n */\nexport const LogsService: GenService<{\n /**\n * @generated from rpc opentelemetry.proto.collector.logs.v1.LogsService.Export\n */\n export: {\n methodKind: \"unary\";\n input: typeof ExportLogsServiceRequestSchema;\n output: typeof ExportLogsServiceResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_opentelemetry_proto_collector_logs_v1_logs_service, 0);\n\n","import { fromBinary, toBinary, create } from \"@bufbuild/protobuf\";\nimport type { otlp, otlpMetrics } from \"@kopai/core\";\nimport {\n ExportTraceServiceRequestSchema,\n ExportTraceServiceResponseSchema,\n} from \"../gen/opentelemetry/proto/collector/trace/v1/trace_service_pb.js\";\nimport {\n ExportMetricsServiceRequestSchema,\n ExportMetricsServiceResponseSchema,\n} from \"../gen/opentelemetry/proto/collector/metrics/v1/metrics_service_pb.js\";\nimport {\n ExportLogsServiceRequestSchema,\n ExportLogsServiceResponseSchema,\n} from \"../gen/opentelemetry/proto/collector/logs/v1/logs_service_pb.js\";\nimport type {\n ResourceSpans,\n Span,\n Span_Event,\n Span_Link,\n Status,\n ScopeSpans,\n} from \"../gen/opentelemetry/proto/trace/v1/trace_pb.js\";\nimport type {\n ResourceMetrics,\n ScopeMetrics,\n Metric,\n NumberDataPoint,\n HistogramDataPoint,\n ExponentialHistogramDataPoint,\n SummaryDataPoint,\n Exemplar,\n} from \"../gen/opentelemetry/proto/metrics/v1/metrics_pb.js\";\nimport type {\n ResourceLogs,\n ScopeLogs,\n LogRecord,\n} from \"../gen/opentelemetry/proto/logs/v1/logs_pb.js\";\nimport type { Resource } from \"../gen/opentelemetry/proto/resource/v1/resource_pb.js\";\nimport type {\n AnyValue,\n KeyValue,\n InstrumentationScope,\n} from \"../gen/opentelemetry/proto/common/v1/common_pb.js\";\n\n// Utility functions for converting between protobuf binary types and JSON types\n\nfunction bytesToHex(bytes: Uint8Array): string {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n\nfunction bigintToString(value: bigint): string {\n return value.toString();\n}\n\nfunction stringToBigint(value: string | undefined): bigint {\n return value ? BigInt(value) : 0n;\n}\n\n// Convert AnyValue from protobuf to JSON format\nfunction convertAnyValue(\n value: AnyValue | undefined\n): otlp.AnyValue | undefined {\n if (!value || value.value.case === undefined) {\n return undefined;\n }\n\n switch (value.value.case) {\n case \"stringValue\":\n return { stringValue: value.value.value };\n case \"boolValue\":\n return { boolValue: value.value.value };\n case \"intValue\":\n return { intValue: bigintToString(value.value.value) };\n case \"doubleValue\":\n return { doubleValue: value.value.value };\n case \"bytesValue\":\n return { bytesValue: bytesToHex(value.value.value) };\n case \"arrayValue\":\n return {\n arrayValue: {\n values: value.value.value.values\n .map(convertAnyValue)\n .filter(Boolean) as otlp.AnyValue[],\n },\n };\n case \"kvlistValue\":\n return {\n kvlistValue: {\n values: value.value.value.values.map(convertKeyValue),\n },\n };\n default:\n return undefined;\n }\n}\n\n// Convert KeyValue from protobuf to JSON format\nfunction convertKeyValue(kv: KeyValue): otlp.KeyValue {\n return {\n key: kv.key,\n value: convertAnyValue(kv.value),\n };\n}\n\n// Convert InstrumentationScope from protobuf to JSON format\nfunction convertInstrumentationScope(\n scope: InstrumentationScope | undefined\n): otlp.InstrumentationScope | undefined {\n if (!scope) return undefined;\n return {\n name: scope.name || undefined,\n version: scope.version || undefined,\n attributes:\n scope.attributes.length > 0\n ? scope.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: scope.droppedAttributesCount || undefined,\n };\n}\n\n// Convert Resource from protobuf to JSON format\nfunction convertResource(\n resource: Resource | undefined\n): otlp.Resource | undefined {\n if (!resource) return undefined;\n return {\n attributes:\n resource.attributes.length > 0\n ? resource.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: resource.droppedAttributesCount || undefined,\n };\n}\n\n// === TRACES CONVERSION ===\n\nfunction convertStatus(status: Status | undefined): otlp.Status | undefined {\n if (!status) return undefined;\n return {\n code: status.code as number,\n message: status.message || undefined,\n };\n}\n\nfunction convertSpanEvent(event: Span_Event): otlp.Span_Event {\n return {\n timeUnixNano: bigintToString(event.timeUnixNano),\n name: event.name || undefined,\n attributes:\n event.attributes.length > 0\n ? event.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: event.droppedAttributesCount || undefined,\n };\n}\n\nfunction convertSpanLink(link: Span_Link): otlp.Span_Link {\n return {\n traceId: bytesToHex(link.traceId),\n spanId: bytesToHex(link.spanId),\n traceState: link.traceState || undefined,\n attributes:\n link.attributes.length > 0\n ? link.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: link.droppedAttributesCount || undefined,\n flags: link.flags || undefined,\n };\n}\n\nfunction convertSpan(span: Span): otlp.Span {\n return {\n traceId: bytesToHex(span.traceId),\n spanId: bytesToHex(span.spanId),\n traceState: span.traceState || undefined,\n parentSpanId:\n span.parentSpanId.length > 0 ? bytesToHex(span.parentSpanId) : undefined,\n flags: span.flags || undefined,\n name: span.name || undefined,\n kind: span.kind as number,\n startTimeUnixNano: bigintToString(span.startTimeUnixNano),\n endTimeUnixNano: bigintToString(span.endTimeUnixNano),\n attributes:\n span.attributes.length > 0\n ? span.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: span.droppedAttributesCount || undefined,\n events:\n span.events.length > 0 ? span.events.map(convertSpanEvent) : undefined,\n droppedEventsCount: span.droppedEventsCount || undefined,\n links: span.links.length > 0 ? span.links.map(convertSpanLink) : undefined,\n droppedLinksCount: span.droppedLinksCount || undefined,\n status: convertStatus(span.status),\n };\n}\n\nfunction convertScopeSpans(scopeSpans: ScopeSpans): otlp.ScopeSpans {\n return {\n scope: convertInstrumentationScope(scopeSpans.scope),\n spans:\n scopeSpans.spans.length > 0\n ? scopeSpans.spans.map(convertSpan)\n : undefined,\n schemaUrl: scopeSpans.schemaUrl || undefined,\n };\n}\n\nfunction convertResourceSpans(rs: ResourceSpans): otlp.ResourceSpans {\n return {\n resource: convertResource(rs.resource),\n scopeSpans:\n rs.scopeSpans.length > 0\n ? rs.scopeSpans.map(convertScopeSpans)\n : undefined,\n schemaUrl: rs.schemaUrl || undefined,\n };\n}\n\n// === METRICS CONVERSION ===\n\nfunction convertExemplar(exemplar: Exemplar): otlpMetrics.Exemplar {\n return {\n filteredAttributes:\n exemplar.filteredAttributes.length > 0\n ? exemplar.filteredAttributes.map(convertKeyValue)\n : undefined,\n timeUnixNano: bigintToString(exemplar.timeUnixNano),\n asDouble:\n exemplar.value.case === \"asDouble\" ? exemplar.value.value : undefined,\n asInt:\n exemplar.value.case === \"asInt\"\n ? bigintToString(exemplar.value.value)\n : undefined,\n spanId:\n exemplar.spanId.length > 0 ? bytesToHex(exemplar.spanId) : undefined,\n traceId:\n exemplar.traceId.length > 0 ? bytesToHex(exemplar.traceId) : undefined,\n };\n}\n\nfunction convertNumberDataPoint(\n dp: NumberDataPoint\n): otlpMetrics.NumberDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n asDouble: dp.value.case === \"asDouble\" ? dp.value.value : undefined,\n asInt:\n dp.value.case === \"asInt\" ? bigintToString(dp.value.value) : undefined,\n exemplars:\n dp.exemplars.length > 0 ? dp.exemplars.map(convertExemplar) : undefined,\n flags: dp.flags || undefined,\n };\n}\n\nfunction convertHistogramDataPoint(\n dp: HistogramDataPoint\n): otlpMetrics.HistogramDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n count: bigintToString(dp.count),\n sum: dp.sum,\n bucketCounts: dp.bucketCounts.map((v) => Number(v)),\n explicitBounds:\n dp.explicitBounds.length > 0 ? [...dp.explicitBounds] : undefined,\n exemplars:\n dp.exemplars.length > 0 ? dp.exemplars.map(convertExemplar) : undefined,\n flags: dp.flags || undefined,\n min: dp.min,\n max: dp.max,\n };\n}\n\nfunction convertExponentialHistogramDataPoint(\n dp: ExponentialHistogramDataPoint\n): otlpMetrics.ExponentialHistogramDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n count: bigintToString(dp.count),\n sum: dp.sum,\n scale: dp.scale,\n zeroCount: bigintToString(dp.zeroCount),\n positive: dp.positive\n ? {\n offset: dp.positive.offset,\n bucketCounts: dp.positive.bucketCounts.map((v) => Number(v)),\n }\n : undefined,\n negative: dp.negative\n ? {\n offset: dp.negative.offset,\n bucketCounts: dp.negative.bucketCounts.map((v) => Number(v)),\n }\n : undefined,\n flags: dp.flags || undefined,\n exemplars:\n dp.exemplars.length > 0 ? dp.exemplars.map(convertExemplar) : undefined,\n min: dp.min,\n max: dp.max,\n zeroThreshold: dp.zeroThreshold,\n };\n}\n\nfunction convertSummaryDataPoint(\n dp: SummaryDataPoint\n): otlpMetrics.SummaryDataPoint {\n return {\n attributes:\n dp.attributes.length > 0 ? dp.attributes.map(convertKeyValue) : undefined,\n startTimeUnixNano: bigintToString(dp.startTimeUnixNano),\n timeUnixNano: bigintToString(dp.timeUnixNano),\n count: bigintToString(dp.count),\n sum: dp.sum,\n quantileValues:\n dp.quantileValues.length > 0\n ? dp.quantileValues.map((qv) => ({\n quantile: qv.quantile,\n value: qv.value,\n }))\n : undefined,\n flags: dp.flags || undefined,\n };\n}\n\nfunction convertMetric(metric: Metric): otlpMetrics.Metric {\n const base: otlpMetrics.Metric = {\n name: metric.name || undefined,\n description: metric.description || undefined,\n unit: metric.unit || undefined,\n metadata:\n metric.metadata.length > 0\n ? metric.metadata.map(convertKeyValue)\n : undefined,\n };\n\n switch (metric.data.case) {\n case \"gauge\":\n return {\n ...base,\n gauge: {\n dataPoints: metric.data.value.dataPoints.map(convertNumberDataPoint),\n },\n };\n case \"sum\":\n return {\n ...base,\n sum: {\n dataPoints: metric.data.value.dataPoints.map(convertNumberDataPoint),\n aggregationTemporality: metric.data.value\n .aggregationTemporality as number,\n isMonotonic: metric.data.value.isMonotonic,\n },\n };\n case \"histogram\":\n return {\n ...base,\n histogram: {\n dataPoints: metric.data.value.dataPoints.map(\n convertHistogramDataPoint\n ),\n aggregationTemporality: metric.data.value\n .aggregationTemporality as number,\n },\n };\n case \"exponentialHistogram\":\n return {\n ...base,\n exponentialHistogram: {\n dataPoints: metric.data.value.dataPoints.map(\n convertExponentialHistogramDataPoint\n ),\n aggregationTemporality: metric.data.value\n .aggregationTemporality as number,\n },\n };\n case \"summary\":\n return {\n ...base,\n summary: {\n dataPoints: metric.data.value.dataPoints.map(convertSummaryDataPoint),\n },\n };\n default:\n return base;\n }\n}\n\nfunction convertScopeMetrics(sm: ScopeMetrics): otlpMetrics.ScopeMetrics {\n return {\n scope: convertInstrumentationScope(sm.scope),\n metrics: sm.metrics.length > 0 ? sm.metrics.map(convertMetric) : undefined,\n schemaUrl: sm.schemaUrl || undefined,\n };\n}\n\nfunction convertResourceMetrics(\n rm: ResourceMetrics\n): otlpMetrics.ResourceMetrics {\n return {\n resource: convertResource(rm.resource),\n scopeMetrics:\n rm.scopeMetrics.length > 0\n ? rm.scopeMetrics.map(convertScopeMetrics)\n : undefined,\n schemaUrl: rm.schemaUrl || undefined,\n };\n}\n\n// === LOGS CONVERSION ===\n\nfunction convertLogRecord(log: LogRecord): otlp.LogRecord {\n return {\n timeUnixNano: bigintToString(log.timeUnixNano),\n observedTimeUnixNano: bigintToString(log.observedTimeUnixNano),\n severityNumber: log.severityNumber as number,\n severityText: log.severityText || undefined,\n body: convertAnyValue(log.body),\n attributes:\n log.attributes.length > 0\n ? log.attributes.map(convertKeyValue)\n : undefined,\n droppedAttributesCount: log.droppedAttributesCount || undefined,\n flags: log.flags || undefined,\n traceId: log.traceId.length > 0 ? bytesToHex(log.traceId) : undefined,\n spanId: log.spanId.length > 0 ? bytesToHex(log.spanId) : undefined,\n };\n}\n\nfunction convertScopeLogs(sl: ScopeLogs): otlp.ScopeLogs {\n return {\n scope: convertInstrumentationScope(sl.scope),\n logRecords:\n sl.logRecords.length > 0\n ? sl.logRecords.map(convertLogRecord)\n : undefined,\n schemaUrl: sl.schemaUrl || undefined,\n };\n}\n\nfunction convertResourceLogs(rl: ResourceLogs): otlp.ResourceLogs {\n return {\n resource: convertResource(rl.resource),\n scopeLogs:\n rl.scopeLogs.length > 0 ? rl.scopeLogs.map(convertScopeLogs) : undefined,\n schemaUrl: rl.schemaUrl || undefined,\n };\n}\n\n// === MAIN DECODE FUNCTIONS ===\n\nexport function decodeTracesRequest(buffer: Uint8Array): otlp.TracesData {\n const request = fromBinary(ExportTraceServiceRequestSchema, buffer);\n return {\n resourceSpans: request.resourceSpans.map(convertResourceSpans),\n };\n}\n\nexport function decodeMetricsRequest(\n buffer: Uint8Array\n): otlpMetrics.MetricsData {\n const request = fromBinary(ExportMetricsServiceRequestSchema, buffer);\n return {\n resourceMetrics: request.resourceMetrics.map(convertResourceMetrics),\n };\n}\n\nexport function decodeLogsRequest(buffer: Uint8Array): otlp.LogsData {\n const request = fromBinary(ExportLogsServiceRequestSchema, buffer);\n return {\n resourceLogs: request.resourceLogs.map(convertResourceLogs),\n };\n}\n\n// === RESPONSE ENCODING ===\n\nexport function encodeTracesResponse(response: {\n rejectedSpans?: string;\n errorMessage?: string;\n}): Uint8Array {\n const msg = create(ExportTraceServiceResponseSchema, {\n partialSuccess: {\n rejectedSpans: stringToBigint(response.rejectedSpans),\n errorMessage: response.errorMessage ?? \"\",\n },\n });\n return toBinary(ExportTraceServiceResponseSchema, msg);\n}\n\nexport function encodeMetricsResponse(response: {\n rejectedDataPoints?: string;\n errorMessage?: string;\n}): Uint8Array {\n const msg = create(ExportMetricsServiceResponseSchema, {\n partialSuccess: {\n rejectedDataPoints: stringToBigint(response.rejectedDataPoints),\n errorMessage: response.errorMessage ?? \"\",\n },\n });\n return toBinary(ExportMetricsServiceResponseSchema, msg);\n}\n\nexport function encodeLogsResponse(response: {\n rejectedLogRecords?: string;\n errorMessage?: string;\n}): Uint8Array {\n const msg = create(ExportLogsServiceResponseSchema, {\n partialSuccess: {\n rejectedLogRecords: stringToBigint(response.rejectedLogRecords),\n errorMessage: response.errorMessage ?? \"\",\n },\n });\n return toBinary(ExportLogsServiceResponseSchema, msg);\n}\n\nexport {\n ExportTraceServiceRequestSchema,\n ExportMetricsServiceRequestSchema,\n ExportLogsServiceRequestSchema,\n};\n","import type { FastifyPluginAsync, FastifyRequest, FastifyReply } from \"fastify\";\nimport fp from \"fastify-plugin\";\nimport {\n decodeTracesRequest,\n decodeMetricsRequest,\n decodeLogsRequest,\n encodeTracesResponse,\n encodeMetricsResponse,\n encodeLogsResponse,\n} from \"./converter.js\";\n\nconst PROTOBUF_CONTENT_TYPE = \"application/x-protobuf\";\n\n// Store original content-type on request for response serialization\ndeclare module \"fastify\" {\n interface FastifyRequest {\n originalContentType?: string;\n }\n}\n\n/**\n * Fastify plugin that adds OTLP/HTTP protobuf support.\n *\n * Per OTLP spec, the response Content-Type must match the request Content-Type.\n * This plugin:\n * 1. Adds a content-type parser for application/x-protobuf\n * 2. Decodes protobuf binary to JSON objects (with bytes→hex conversion)\n * 3. Encodes responses back to protobuf when the request was protobuf\n */\nconst protobufPluginImpl: FastifyPluginAsync = async (fastify) => {\n // Store original content-type before any processing\n fastify.addHook(\"preHandler\", async (request: FastifyRequest) => {\n request.originalContentType =\n request.headers[\"content-type\"]?.split(\";\")[0];\n });\n\n // Add protobuf content-type parser\n fastify.addContentTypeParser(\n PROTOBUF_CONTENT_TYPE,\n { parseAs: \"buffer\" },\n (request: FastifyRequest, payload: Buffer, done) => {\n try {\n const url = request.url;\n const buffer = new Uint8Array(payload);\n\n if (url === \"/v1/traces\") {\n const decoded = decodeTracesRequest(buffer);\n done(null, decoded);\n } else if (url === \"/v1/metrics\") {\n const decoded = decodeMetricsRequest(buffer);\n done(null, decoded);\n } else if (url === \"/v1/logs\") {\n const decoded = decodeLogsRequest(buffer);\n done(null, decoded);\n } else {\n done(new Error(`Unknown OTLP endpoint: ${url}`), undefined);\n }\n } catch (err) {\n request.log.error(err, \"Failed to decode protobuf payload\");\n done(err as Error, undefined);\n }\n }\n );\n\n // Override response serializer to encode protobuf when needed\n // Use onSend hook which runs after serialization, allowing us to replace the payload\n fastify.addHook(\n \"onSend\",\n async (request: FastifyRequest, reply: FastifyReply, payload: unknown) => {\n // Only handle protobuf requests\n if (request.originalContentType !== PROTOBUF_CONTENT_TYPE) {\n return payload;\n }\n\n // Parse the JSON payload that was serialized by Fastify\n let data: {\n partialSuccess?: {\n rejectedSpans?: string;\n rejectedDataPoints?: string;\n rejectedLogRecords?: string;\n errorMessage?: string;\n };\n };\n\n try {\n data = JSON.parse(payload as string);\n } catch (err) {\n request.log.warn(\n err,\n \"Failed to parse JSON payload in protobuf response\"\n );\n return payload;\n }\n\n // Set response content-type to match request (per OTLP spec)\n reply.header(\"content-type\", PROTOBUF_CONTENT_TYPE);\n\n const url = request.url;\n\n try {\n let encoded: Uint8Array;\n\n if (url === \"/v1/traces\") {\n encoded = encodeTracesResponse({\n rejectedSpans: data.partialSuccess?.rejectedSpans,\n errorMessage: data.partialSuccess?.errorMessage,\n });\n } else if (url === \"/v1/metrics\") {\n encoded = encodeMetricsResponse({\n rejectedDataPoints: data.partialSuccess?.rejectedDataPoints,\n errorMessage: data.partialSuccess?.errorMessage,\n });\n } else if (url === \"/v1/logs\") {\n encoded = encodeLogsResponse({\n rejectedLogRecords: data.partialSuccess?.rejectedLogRecords,\n errorMessage: data.partialSuccess?.errorMessage,\n });\n } else {\n return payload;\n }\n\n // Return buffer to be sent directly\n return Buffer.from(encoded);\n } catch (err) {\n request.log.warn(err, \"Failed to encode protobuf response\");\n return payload;\n }\n }\n );\n};\n\nexport const protobufPlugin = fp(protobufPluginImpl, {\n name: \"protobuf-plugin\",\n});\n\nexport { PROTOBUF_CONTENT_TYPE };\n","import { createGunzip } from \"node:zlib\";\nimport type { FastifyPluginAsyncZod } from \"fastify-type-provider-zod\";\nimport type { datasource } from \"@kopai/core\";\nimport {\n serializerCompiler,\n validatorCompiler,\n} from \"fastify-type-provider-zod\";\n\nimport { metricsRoute } from \"./routes/metrics.js\";\nimport { tracesRoute } from \"./routes/traces.js\";\nimport { logsRoute } from \"./routes/logs.js\";\nimport { collectorErrorHandler } from \"./routes/error-handler.js\";\nimport { protobufPlugin } from \"./protobuf/index.js\";\n\nexport const collectorRoutes: FastifyPluginAsyncZod<{\n telemetryDatasource: datasource.WriteTelemetryDatasource;\n}> = async function (fastify, opts) {\n fastify.setValidatorCompiler(validatorCompiler);\n fastify.setSerializerCompiler(serializerCompiler);\n fastify.setErrorHandler(collectorErrorHandler);\n\n // Decompress gzip request bodies (OTLP/HTTP defaults to gzip compression).\n // Fastify's default bodyLimit (1 MiB) applies to the decoded payload,\n // which implicitly caps decompression size and protects against decompression bombs.\n fastify.addHook(\"preParsing\", async (request, _reply, payload) => {\n const encoding = request.headers[\"content-encoding\"];\n if (encoding === \"gzip\" || encoding === \"x-gzip\") {\n const contentLength = request.headers[\"content-length\"];\n delete request.headers[\"content-encoding\"];\n delete request.headers[\"content-length\"];\n const decompressed = payload.pipe(createGunzip());\n if (contentLength) {\n Object.assign(decompressed, {\n receivedEncodedLength: parseInt(contentLength, 10),\n });\n }\n return decompressed;\n }\n return payload;\n });\n\n // Register protobuf support (OTLP/HTTP with application/x-protobuf)\n fastify.register(protobufPlugin);\n\n fastify.register(metricsRoute, {\n writeMetricsDatasource: opts.telemetryDatasource,\n });\n\n fastify.register(tracesRoute, {\n writeTracesDatasource: opts.telemetryDatasource,\n });\n\n fastify.register(logsRoute, {\n writeLogsDatasource: opts.telemetryDatasource,\n });\n};\n"],"mappings":";;;;;;;;;;AAKA,MAAM,qCAAqC,EAAE,OAAO,EAClD,gBAAgB,EACb,OAAO;CACN,oBAAoB,EAAE,QAAQ,CAAC,UAAU;CACzC,cAAc,EAAE,QAAQ,CAAC,U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eAAe,QAAQ,KAAK,cAAc,CAAC;AACjD,OAAI,cACF,QAAO,OAAO,cAAc,EAC1B,uBAAuB,SAAS,eAAe,GAAG,EACnD,CAAC;AAEJ,UAAO;;AAET,SAAO;GACP;AAGF,SAAQ,SAAS,eAAe;AAEhC,SAAQ,SAAS,cAAc,EAC7B,wBAAwB,KAAK,qBAC9B,CAAC;AAEF,SAAQ,SAAS,aAAa,EAC5B,uBAAuB,KAAK,qBAC7B,CAAC;AAEF,SAAQ,SAAS,WAAW,EAC1B,qBAAqB,KAAK,qBAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopai/collector",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Vladimir Adamic",
6
6
  "repository": {
@@ -37,7 +37,7 @@
37
37
  "@kopai/core": "0.5.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@bufbuild/buf": "^1.64.0",
40
+ "@bufbuild/buf": "^1.65.0",
41
41
  "@bufbuild/protoc-gen-es": "^2.11.0",
42
42
  "@opentelemetry/api": "^1.9.0",
43
43
  "@opentelemetry/api-logs": "^0.211.0",
@@ -53,7 +53,7 @@
53
53
  "@opentelemetry/sdk-trace-base": "^2.5.0",
54
54
  "@opentelemetry/sdk-trace-node": "^2.5.0",
55
55
  "@opentelemetry/semantic-conventions": "^1.39.0",
56
- "tsdown": "^0.20.1",
56
+ "tsdown": "^0.20.3",
57
57
  "@kopai/tsconfig": "0.2.0"
58
58
  },
59
59
  "scripts": {