import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Profile } from "./alternatives/pprofextended/pprofextended"; import { KeyValue } from "../../common/v1/common"; import { InstrumentationScope } from "../../common/v1/common"; import { Resource } from "../../resource/v1/resource"; /** * Relationships Diagram * * ┌──────────────────┐ LEGEND * │ ProfilesData │ * └──────────────────┘ ─────▶ embedded * │ * │ 1-n ─────▷ referenced by index * ▼ * ┌──────────────────┐ * │ ResourceProfiles │ * └──────────────────┘ * │ * │ 1-n * ▼ * ┌──────────────────┐ * │ ScopeProfiles │ * └──────────────────┘ * │ * │ 1-n * ▼ * ┌──────────────────┐ * │ ProfileContainer │ * └──────────────────┘ * │ * │ 1-1 * ▼ * ┌──────────────────┐ * │ Profile │ * └──────────────────┘ * │ 1-n * │ 1-n ┌───────────────────────────────────────┐ * ▼ │ ▽ * ┌──────────────────┐ 1-n ┌──────────────┐ ┌──────────┐ * │ Sample │ ──────▷ │ KeyValue │ │ Link │ * └──────────────────┘ └──────────────┘ └──────────┘ * │ 1-n △ △ * │ 1-n ┌─────────────────┘ │ 1-n * ▽ │ │ * ┌──────────────────┐ n-1 ┌──────────────┐ * │ Location │ ──────▷ │ Mapping │ * └──────────────────┘ └──────────────┘ * │ * │ 1-n * ▼ * ┌──────────────────┐ * │ Line │ * └──────────────────┘ * │ * │ 1-1 * ▽ * ┌──────────────────┐ * │ Function │ * └──────────────────┘ * * ProfilesData represents the profiles data that can be stored in persistent storage, * OR can be embedded by other protocols that transfer OTLP profiles data but do not * implement the OTLP protocol. * * The main difference between this message and collector protocol is that * in this message there will not be any "control" or "metadata" specific to * OTLP protocol. * * When new fields are added into this message, the OTLP request MUST be updated * as well. * * @generated from protobuf message opentelemetry.proto.profiles.v1.ProfilesData */ export interface ProfilesData { /** * An array of ResourceProfiles. * For data coming from a single resource this array will typically contain * one element. Intermediary nodes that receive data from multiple origins * typically batch the data before forwarding further and in that case this * array will contain multiple elements. * * @generated from protobuf field: repeated opentelemetry.proto.profiles.v1.ResourceProfiles resource_profiles = 1; */ resourceProfiles: ResourceProfiles[]; } /** * A collection of ScopeProfiles from a Resource. * * @generated from protobuf message opentelemetry.proto.profiles.v1.ResourceProfiles */ export interface ResourceProfiles { /** * The resource for the profiles in this message. * If this field is not set then no resource info is known. * * @generated from protobuf field: opentelemetry.proto.resource.v1.Resource resource = 1; */ resource?: Resource; /** * A list of ScopeProfiles that originate from a resource. * * @generated from protobuf field: repeated opentelemetry.proto.profiles.v1.ScopeProfiles scope_profiles = 2; */ scopeProfiles: ScopeProfiles[]; /** * This schema_url applies to the data in the "resource" field. It does not apply * to the data in the "scope_profiles" field which have their own schema_url field. * * @generated from protobuf field: string schema_url = 3; */ schemaUrl: string; } /** * A collection of Profiles produced by an InstrumentationScope. * * @generated from protobuf message opentelemetry.proto.profiles.v1.ScopeProfiles */ export interface ScopeProfiles { /** * The instrumentation scope information for the profiles in this message. * Semantically when InstrumentationScope isn't set, it is equivalent with * an empty instrumentation scope name (unknown). * * @generated from protobuf field: opentelemetry.proto.common.v1.InstrumentationScope scope = 1; */ scope?: InstrumentationScope; /** * A list of ProfileContainers that originate from an instrumentation scope. * * @generated from protobuf field: repeated opentelemetry.proto.profiles.v1.ProfileContainer profiles = 2; */ profiles: ProfileContainer[]; /** * This schema_url applies to all profiles and profile events in the "profiles" field. * * @generated from protobuf field: string schema_url = 3; */ schemaUrl: string; } /** * A ProfileContainer represents a single profile. It wraps pprof profile with OpenTelemetry specific metadata. * * @generated from protobuf message opentelemetry.proto.profiles.v1.ProfileContainer */ export interface ProfileContainer { /** * A unique identifier for a profile. The ID is a 16-byte array. An ID with * all zeroes is considered invalid. * * This field is required. * * @generated from protobuf field: bytes profile_id = 1; */ profileId: Uint8Array; /** * start_time_unix_nano is the start time of the profile. * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. * * This field is semantically required and it is expected that end_time >= start_time. * * @generated from protobuf field: fixed64 start_time_unix_nano = 2; */ startTimeUnixNano: bigint; /** * end_time_unix_nano is the end time of the profile. * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. * * This field is semantically required and it is expected that end_time >= start_time. * * @generated from protobuf field: fixed64 end_time_unix_nano = 3; */ endTimeUnixNano: bigint; /** * attributes is a collection of key/value pairs. Note, global attributes * like server name can be set using the resource API. Examples of attributes: * * "/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" * "/http/server_latency": 300 * "abc.com/myattribute": true * "abc.com/score": 10.239 * * The OpenTelemetry API specification further restricts the allowed value types: * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute * Attribute keys MUST be unique (it is not allowed to have more than one * attribute with the same key). * * @generated from protobuf field: repeated opentelemetry.proto.common.v1.KeyValue attributes = 4; */ attributes: KeyValue[]; /** * dropped_attributes_count is the number of attributes that were discarded. Attributes * can be discarded because their keys are too long or because there are too many * attributes. If this value is 0, then no attributes were dropped. * * @generated from protobuf field: uint32 dropped_attributes_count = 5; */ droppedAttributesCount: number; /** * Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] * * @generated from protobuf field: string original_payload_format = 6; */ originalPayloadFormat: string; /** * Original payload can be stored in this field. This can be useful for users who want to get the original payload. * Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. * Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. * If the original payload is in pprof format, it SHOULD not be included in this field. * The field is optional, however if it is present `profile` MUST be present and contain the same profiling information. * * @generated from protobuf field: bytes original_payload = 7; */ originalPayload: Uint8Array; /** * This is a reference to a pprof profile. Required, even when original_payload is present. * * @generated from protobuf field: opentelemetry.proto.profiles.v1.alternatives.pprofextended.Profile profile = 8; */ profile?: Profile; } declare class ProfilesData$Type extends MessageType { constructor(); create(value?: PartialMessage): ProfilesData; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProfilesData): ProfilesData; internalBinaryWrite(message: ProfilesData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message opentelemetry.proto.profiles.v1.ProfilesData */ export declare const ProfilesData: ProfilesData$Type; declare class ResourceProfiles$Type extends MessageType { constructor(); create(value?: PartialMessage): ResourceProfiles; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceProfiles): ResourceProfiles; internalBinaryWrite(message: ResourceProfiles, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message opentelemetry.proto.profiles.v1.ResourceProfiles */ export declare const ResourceProfiles: ResourceProfiles$Type; declare class ScopeProfiles$Type extends MessageType { constructor(); create(value?: PartialMessage): ScopeProfiles; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ScopeProfiles): ScopeProfiles; internalBinaryWrite(message: ScopeProfiles, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message opentelemetry.proto.profiles.v1.ScopeProfiles */ export declare const ScopeProfiles: ScopeProfiles$Type; declare class ProfileContainer$Type extends MessageType { constructor(); create(value?: PartialMessage): ProfileContainer; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProfileContainer): ProfileContainer; internalBinaryWrite(message: ProfileContainer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message opentelemetry.proto.profiles.v1.ProfileContainer */ export declare const ProfileContainer: ProfileContainer$Type; export {}; //# sourceMappingURL=profiles.d.ts.map