Documentation
¶
Index ¶
- Constants
- Variables
- func GetCounter(meter metric.Meter, name CounterType) (metric.Int64Counter, error)
- func GetFloatHistogram(meter metric.Meter, name HistogramType) (metric.Float64Histogram, error)
- func GetGaugeFloat(meter metric.Meter, name GaugeFloatType) (metric.Float64ObservableGauge, error)
- func GetGaugeInt(meter metric.Meter, name GaugeIntType) (metric.Int64ObservableGauge, error)
- func GetHistogram(meter metric.Meter, name HistogramType) (metric.Int64Histogram, error)
- func GetObservableCounter(meter metric.Meter, name ObservableCounterType, ...) (metric.Int64ObservableCounter, error)
- func GetObservableUpDownCounter(meter metric.Meter, name ObservableUpDownCounterType, ...) (metric.Int64ObservableUpDownCounter, error)
- func GetResource(ctx context.Context, ...) (*resource.Resource, error)
- func HostKernelVersion() string
- func NewEventWriter(ctx context.Context, name string) io.Writer
- func NewMeterExporter(ctx context.Context, extraOption ...otlpmetricgrpc.Option) (sdkmetric.Exporter, error)
- func NewMeterProvider(metricsExporter sdkmetric.Exporter, metricExportPeriod time.Duration, ...) (*sdkmetric.MeterProvider, error)
- func NewPprofMux() *http.ServeMux
- func NewPprofServer() *http.Server
- func NewSpanExporter(ctx context.Context, extraOption ...otlptracegrpc.Option) (sdktrace.SpanExporter, error)
- func NewTextPropagator() propagation.TextMapPropagator
- func NewTracerProvider(spanExporter sdktrace.SpanExporter, res *resource.Resource) trace.TracerProvider
- func OTELCollectorGRPCEndpoint() string
- func Observe0(ctx context.Context, tracer trace.Tracer, name string, ...) error
- func Observe1[T any, E interface{ ... }](ctx context.Context, tracer trace.Tracer, name string, ...) (T, E)
- func ParseEdgeTraceID(gcpHeader, awsHeader string) (string, bool)
- func PprofPort() int
- func PrecomputeAttrs(kv ...attribute.KeyValue) metric.MeasurementOption
- func ReportCriticalError(ctx context.Context, message string, err error, attrs ...attribute.KeyValue)
- func ReportError(ctx context.Context, message string, err error, attrs ...attribute.KeyValue)
- func ReportErrorByCode(ctx context.Context, code int, message string, err error, ...)
- func ReportEvent(ctx context.Context, name string, attrs ...attribute.KeyValue)
- func SetAttributes(ctx context.Context, attrs ...attribute.KeyValue)
- func WithBuildID(buildID string) attribute.KeyValue
- func WithClusterID(clusterID uuid.UUID) attribute.KeyValue
- func WithEdgeTraceID(traceID string) attribute.KeyValue
- func WithEnvdVersion(envdVersion string) attribute.KeyValue
- func WithFirecrackerVersion(firecrackerVersion string) attribute.KeyValue
- func WithKernelVersion(kernelVersion string) attribute.KeyValue
- func WithMaskedAPIKey(maskedAPIKey string) attribute.KeyValue
- func WithNodeID(nodeID string) attribute.KeyValue
- func WithSandboxID(sandboxID string) attribute.KeyValue
- func WithServiceInstanceID(serviceInstanceID string) attribute.KeyValue
- func WithTeamID(teamID string) attribute.KeyValue
- func WithTemplateID(templateID string) attribute.KeyValue
- func WithUserID(userID string) attribute.KeyValue
- type Client
- type CounterType
- type EventWriter
- type FloatTimerFactory
- type GaugeFloatType
- type GaugeIntType
- type HistogramType
- type LogProvider
- type ObservableCounterType
- type ObservableUpDownCounterType
- type Option
- type Stopwatch
- type TimerFactory
- type ZapFieldToOTELAttributeEncoder
- func (z *ZapFieldToOTELAttributeEncoder) AddArray(_ string, _ zapcore.ArrayMarshaler) error
- func (z *ZapFieldToOTELAttributeEncoder) AddBinary(key string, value []byte)
- func (z *ZapFieldToOTELAttributeEncoder) AddBool(key string, value bool)
- func (z *ZapFieldToOTELAttributeEncoder) AddByteString(key string, value []byte)
- func (z *ZapFieldToOTELAttributeEncoder) AddComplex64(key string, value complex64)
- func (z *ZapFieldToOTELAttributeEncoder) AddComplex128(key string, value complex128)
- func (z *ZapFieldToOTELAttributeEncoder) AddDuration(key string, value time.Duration)
- func (z *ZapFieldToOTELAttributeEncoder) AddFloat32(key string, value float32)
- func (z *ZapFieldToOTELAttributeEncoder) AddFloat64(key string, value float64)
- func (z *ZapFieldToOTELAttributeEncoder) AddInt(key string, value int)
- func (z *ZapFieldToOTELAttributeEncoder) AddInt8(key string, value int8)
- func (z *ZapFieldToOTELAttributeEncoder) AddInt16(key string, value int16)
- func (z *ZapFieldToOTELAttributeEncoder) AddInt32(key string, value int32)
- func (z *ZapFieldToOTELAttributeEncoder) AddInt64(key string, value int64)
- func (z *ZapFieldToOTELAttributeEncoder) AddObject(_ string, _ zapcore.ObjectMarshaler) error
- func (z *ZapFieldToOTELAttributeEncoder) AddReflected(key string, value any) error
- func (z *ZapFieldToOTELAttributeEncoder) AddString(key, value string)
- func (z *ZapFieldToOTELAttributeEncoder) AddTime(key string, value time.Time)
- func (z *ZapFieldToOTELAttributeEncoder) AddUint(key string, value uint)
- func (z *ZapFieldToOTELAttributeEncoder) AddUint8(key string, value uint8)
- func (z *ZapFieldToOTELAttributeEncoder) AddUint16(key string, value uint16)
- func (z *ZapFieldToOTELAttributeEncoder) AddUint32(key string, value uint32)
- func (z *ZapFieldToOTELAttributeEncoder) AddUint64(key string, value uint64)
- func (z *ZapFieldToOTELAttributeEncoder) AddUintptr(key string, value uintptr)
- func (z *ZapFieldToOTELAttributeEncoder) OpenNamespace(_ string)
Constants ¶
const ( GCPTraceContextHeader = "X-Cloud-Trace-Context" AWSTraceContextHeader = "X-Amzn-Trace-Id" )
const ( ApiOrchestratorCountMeterName GaugeIntType = "api.orchestrator.status" OrchestratorStatusGaugeName GaugeIntType = "orchestrator.status" OrchestratorSandboxLimitGaugeName GaugeIntType = "orchestrator.sandbox.limit" FirecrackerProcesses GaugeIntType = "orchestrator.firecracker.processes" FirecrackerProcessesUntracked GaugeIntType = "orchestrator.firecracker.processes.untracked" FirecrackerProcessesOverMaxLength GaugeIntType = "orchestrator.firecracker.processes.over_max_length" FirecrackerProcessesUnknownMaxLength GaugeIntType = "orchestrator.firecracker.processes.unknown_max_length" FirecrackerTrackerSuccess GaugeIntType = "orchestrator.firecracker.tracker.success" FirecrackerTrackerLastSuccessAge GaugeIntType = "orchestrator.firecracker.tracker.last_success_age" // OrchestratorGOGCOutcomeGaugeName reports the GC percent controller's // outcome as a state set: every outcome (applied|disabled|refused|error) // on every collection, 1 for the current one and 0 for the rest. OrchestratorGOGCOutcomeGaugeName GaugeIntType = "orchestrator.go.gogc.outcome" // Orchestrator node resources allocated to running sandboxes (sum across running sandboxes) OrchestratorCpuAllocatedGaugeName GaugeIntType = "orchestrator.sandbox.cpu.allocated" OrchestratorMemoryAllocatedGaugeName GaugeIntType = "orchestrator.sandbox.memory.allocated" OrchestratorDiskAllocatedGaugeName GaugeIntType = "orchestrator.sandbox.disk.allocated" // OrchestratorMemoryGuestGaugeName is the guest memory of running sandboxes // by the page_state their memory handler records: not_present (never // faulted in), installing (a fault being served), clean and zero (read // faults, and pages a checkpoint captured since their last write), dirty // (write faults, and reads written since; under async write-protect the // handler sees no later write, so those stay clean) and removed (released // by the guest). Summed over page_state it is the memory allocated gauge // less the guests no handler serves: cold boots, template builds, and // starts whose Firecracker has not connected yet. It counts the memory // Firecracker registered, not the configured RAM. OrchestratorMemoryGuestGaugeName GaugeIntType = "orchestrator.sandbox.memory.guest" // OrchestratorHugePagesFreeGaugeName is the host pool ceiling less used and // reserved pages, before the admission subtracts its pending starts. OrchestratorHugePagesFreeGaugeName GaugeIntType = "orchestrator.hugepages.free" // Sandbox metrics SandboxRamUsedGaugeName GaugeIntType = "e2b.sandbox.ram.used" SandboxRamTotalGaugeName GaugeIntType = "e2b.sandbox.ram.total" SandboxRamCacheGaugeName GaugeIntType = "e2b.sandbox.ram.cache" SandboxCpuTotalGaugeName GaugeIntType = "e2b.sandbox.cpu.total" // CPU hotplug, reported by envd: how many CPUs the guest can online, how many the orchestrator // asked for, how many tries that took, and how long a sysfs online/offline write has been stuck. SandboxCpuPossibleGaugeName GaugeIntType = "e2b.sandbox.cpu.possible" SandboxCpuTargetGaugeName GaugeIntType = "e2b.sandbox.cpu.target" SandboxCpuTargetAttemptsGaugeName GaugeIntType = "e2b.sandbox.cpu.target_attempts" SandboxCpuWritePendingGaugeName GaugeIntType = "e2b.sandbox.cpu.write_pending" SandboxDiskUsedGaugeName GaugeIntType = "e2b.sandbox.disk.used" SandboxDiskTotalGaugeName GaugeIntType = "e2b.sandbox.disk.total" // Template cache residency. mapping_bytes is the load-bearing one: a // Header's compact Mapping is the largest long-lived allocation the // orchestrator holds, and entry count alone hides its growth because // headers differ in size by orders of magnitude. OrchestratorTemplateCacheEntriesGaugeName GaugeIntType = "orchestrator.templates.cache.entries" OrchestratorTemplateCachePinnedGaugeName GaugeIntType = "orchestrator.templates.cache.pinned" OrchestratorTemplateCacheMappingEntriesGaugeName GaugeIntType = "orchestrator.templates.cache.mapping_entries" OrchestratorTemplateCacheMappingBytesGaugeName GaugeIntType = "orchestrator.templates.cache.mapping_bytes" OrchestratorTemplateCachePinnedRefsGaugeName GaugeIntType = "orchestrator.templates.cache.pinned_refs" OrchestratorTemplateCacheOldestPinAgeGaugeName GaugeIntType = "orchestrator.templates.cache.pinned_oldest_age" OrchestratorTemplateCacheLayerEntriesGaugeName GaugeIntType = "orchestrator.templates.cache.layer_entries" OrchestratorTemplateCacheLayerMappingBytesGaugeName GaugeIntType = "orchestrator.templates.cache.layer_mapping_bytes" OrchestratorTemplateCacheLayersUnlandedGaugeName GaugeIntType = "orchestrator.templates.cache.snapshot_layers_unlanded" // Team metrics TeamSandboxRunningGaugeName GaugeIntType = "e2b.team.sandbox.running" SandboxCountGaugeName GaugeIntType = "api.env.instance.running" // ApiOrchestratorNodesWithoutHugepageCeiling counts ready nodes the // hugepage placement limit cannot bound, by reason: no_capacity (the // orchestrator reports no pool ceiling, as builds predating the report // do) | no_page_size. Such a node takes hugepage sandboxes unchecked. // Every API replica reports the whole fleet, so read the max across // replicas, never the sum. ApiOrchestratorNodesWithoutHugepageCeiling GaugeIntType = "api.orchestrator.nodes_without_hugepage_ceiling" // Sandbox store census, taken by every API replica's healer sweep over // the whole store: read the max across replicas, never the sum. ApiRedisStorageRecordsForm GaugeIntType = "api.redis_storage.records.form" ApiRedisStorageCensusComplete GaugeIntType = "api.redis_storage.census.complete" // The repairs the healer's two most recent sweeps made on one replica, by // kind, so a rule can compare consecutive sweeps: the interval is // jittered, so counter windows cannot tell sweeps apart. ApiRedisStorageIndexHealLastSweep GaugeIntType = "api.redis_storage.index_heal.last_sweep" ApiRedisStorageIndexHealPreviousSweep GaugeIntType = "api.redis_storage.index_heal.previous_sweep" // Build resource metrics BuildRootfsSizeHistogramName HistogramType = "template.build.rootfs.size" )
const DefaultPprofPort = 6060
DefaultPprofPort is the default port that we should use to mount pprof endpoint.
const HostKernelVersionKey = attribute.Key("host.kernel.version")
const ServiceCommitKey = attribute.Key("service.commit")
ServiceCommitKey carries the source commit beside service.version. A published version names one commit already; a from-source build reports the tree's SemVer default, and this is what still tells its builds apart.
Variables ¶
var ( // Pre-allocated result attributes for use with PrecomputeAttrs. Success = attribute.String(resultAttr, resultTypeSuccess) Failure = attribute.String(resultAttr, resultTypeFailure) )
var SubMillisecondMsBuckets = []float64{
0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000,
}
SubMillisecondMsBuckets resolve sub-ms operations (mmap / cache hits) that the default OTEL buckets (first boundary 5ms) collapse into one, while still covering remote reads to ~10s.
Functions ¶
func GetCounter ¶
func GetCounter(meter metric.Meter, name CounterType) (metric.Int64Counter, error)
func GetFloatHistogram ¶
func GetFloatHistogram(meter metric.Meter, name HistogramType) (metric.Float64Histogram, error)
func GetGaugeFloat ¶
func GetGaugeFloat(meter metric.Meter, name GaugeFloatType) (metric.Float64ObservableGauge, error)
func GetGaugeInt ¶
func GetGaugeInt(meter metric.Meter, name GaugeIntType) (metric.Int64ObservableGauge, error)
func GetHistogram ¶
func GetHistogram(meter metric.Meter, name HistogramType) (metric.Int64Histogram, error)
GetHistogram returns an Int64 histogram with the registered description and unit. It sets no bucket boundaries: histogramAggregation discards them.
func GetObservableCounter ¶
func GetObservableCounter(meter metric.Meter, name ObservableCounterType, callbacks ...metric.Int64Callback) (metric.Int64ObservableCounter, error)
GetObservableCounter creates the counter with the given callbacks; pass none to observe it from a meter.RegisterCallback registration instead.
func GetObservableUpDownCounter ¶
func GetObservableUpDownCounter(meter metric.Meter, name ObservableUpDownCounterType, callback metric.Int64Callback) (metric.Int64ObservableUpDownCounter, error)
func GetResource ¶
func HostKernelVersion ¶
func HostKernelVersion() string
HostKernelVersion returns the host kernel release, or "" where it cannot be read (non-Linux hosts, or /proc not mounted).
func NewMeterExporter ¶
func NewMeterProvider ¶
func NewPprofMux ¶
NewPprofMux returns a ServeMux with pprof handlers registered on a dedicated mux rather than http.DefaultServeMux, preventing accidental exposure.
Mirrors the five handlers that `_ "net/http/pprof"` registers in its init(). The Index handler already serves all runtime/pprof profiles (heap, goroutine, allocs, block, mutex, threadcreate, etc.) by name from the URL path.
func NewPprofServer ¶
func NewSpanExporter ¶
func NewSpanExporter(ctx context.Context, extraOption ...otlptracegrpc.Option) (sdktrace.SpanExporter, error)
func NewTextPropagator ¶
func NewTextPropagator() propagation.TextMapPropagator
func NewTracerProvider ¶
func NewTracerProvider(spanExporter sdktrace.SpanExporter, res *resource.Resource) trace.TracerProvider
func OTELCollectorGRPCEndpoint ¶
func OTELCollectorGRPCEndpoint() string
func Observe0 ¶
func Observe0(ctx context.Context, tracer trace.Tracer, name string, fn func(context.Context) error, opts ...trace.SpanStartOption) error
Observe0 records one synchronous operation returning only an error.
func Observe1 ¶
func Observe1[T any, E interface { error comparable }](ctx context.Context, tracer trace.Tracer, name string, fn func(context.Context) (T, E), opts ...trace.SpanStartOption) (T, E)
Observe1 records one synchronous operation returning one value and an error.
func ParseEdgeTraceID ¶
ParseEdgeTraceID extracts a trace ID from cloud-provider trace headers. These headers are untrusted and are only used for cross-service correlation.
func PprofPort ¶
func PprofPort() int
PprofPort returns the port the pprof server should bind to: the value of PPROF_PORT when set to a valid port, otherwise DefaultPprofPort.
func PrecomputeAttrs ¶
func PrecomputeAttrs(kv ...attribute.KeyValue) metric.MeasurementOption
PrecomputeAttrs builds a reusable MeasurementOption from the given attribute key-values. The option must include all attributes (including "result"). Use with Stopwatch.Record to avoid per-call attribute allocation.
func ReportCriticalError ¶
func ReportError ¶
func ReportErrorByCode ¶
func WithBuildID ¶
func WithEdgeTraceID ¶
func WithEnvdVersion ¶
func WithFirecrackerVersion ¶
func WithKernelVersion ¶
func WithMaskedAPIKey ¶
func WithNodeID ¶
func WithSandboxID ¶
func WithServiceInstanceID ¶
func WithTeamID ¶
func WithTemplateID ¶
func WithUserID ¶
Types ¶
type Client ¶
type Client struct {
MetricExporter sdkmetric.Exporter
MeterProvider metric.MeterProvider
SpanExporter sdktrace.SpanExporter
TracerProvider trace.TracerProvider
TracePropagator propagation.TextMapPropagator
LogsProvider LogProvider
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, nodeID, serviceName, serviceCommit, serviceVersion, serviceInstanceID string, additional ...attribute.KeyValue) (*Client, error)
New creates a telemetry client that exports traces, metrics, and logs via gRPC. Telemetry is enabled when the OTEL_COLLECTOR_GRPC_ENDPOINT environment variable is set (e.g. "localhost:4317"). When unset, a noop client is returned with zero overhead.
func NewAnonymous ¶
NewAnonymous creates a telemetry client for tools and CLI commands that don't have build-time injected metadata (commitSHA, version, nodeID). serviceName is the primary identifier used for filtering traces and metrics in observability tools (e.g. Grafana). The remaining resource attributes are filled with sensible defaults (hostname, "unknown" commit, "dev" version).
func NewNoopClient ¶
func NewNoopClient() *Client
func NewWithOptions ¶
func NewWithOptions(ctx context.Context, nodeID, serviceName, serviceCommit, serviceVersion, serviceInstanceID string, opts ...Option) (*Client, error)
NewWithOptions is New with options; see New.
func (*Client) FlushMetrics ¶
FlushMetrics exports every measurement recorded so far rather than at the next periodic export, and does nothing on the noop client. ctx bounds the wait, not the export: one that outlives it finishes on the reader's context.
func (*Client) StartRuntimeInstrumentation ¶
StartRuntimeInstrumentation registers OTEL Go runtime metric callbacks.
Collected metrics (semantic-convention names, except go.memory.live and go.sync.mutex.wait.time):
- go.memory.used
- go.memory.limit
- go.memory.allocated
- go.memory.allocations
- go.memory.gc.goal
- go.goroutine.count
- go.processor.limit
- go.config.gogc
- go.memory.live
- go.memory.gc.cycles
- go.cpu.time
- go.sync.mutex.wait.time
The callbacks are invoked by the MeterProvider and stop automatically when it shuts down — no separate goroutine is spawned.
type CounterType ¶
type CounterType string
const ( ApiRateLimitRequests CounterType = "api.rate_limit.requests" ApiSandboxPauseRateLimit CounterType = "api.sandbox_pause.rate_limit" // ApiTemplateBuildBuilderVersionRejected counts resizable template build // starts refused because no template builder in the cluster runs a // release that honours maxVCpuCount. ApiTemplateBuildBuilderVersionRejected CounterType = "api.template.build.builder_version_rejected" // ApiTemplateBuildBuilderPinFallback counts builder lookups that could // not honour the pinned machine info at the required version and fell // back to any builder at that version. ApiTemplateBuildBuilderPinFallback CounterType = "api.template.build.builder_pin_fallback" ApiOrchestratorCreatedSandboxes CounterType = "api.orchestrator.created_sandboxes" ApiOrchestratorResumeOriginNodeRemap CounterType = "api.orchestrator.resume_origin_node_remapped" ApiOrchestratorSandboxFeatureUnsupported CounterType = "api.orchestrator.sandbox_feature_unsupported" // ApiOrchestratorPauseRefusalRestore counts what became of a pause the // node refused retryably: outcome restored | restore_failed | // route_restore_failed | superseded, caller request | eviction. // superseded: the ID was reclaimed by a new incarnation meanwhile; nothing // was restored, removed, or killed. ApiOrchestratorPauseRefusalRestore CounterType = "api.orchestrator.pause_refusal_restore" // ApiOrchestratorNetworkUpdateUnstored counts network updates a node // applied that the store then failed to record: the live egress differs // from the stored config until the next update replaces both. ApiOrchestratorNetworkUpdateUnstored CounterType = "api.orchestrator.network_update_unstored" // ApiOrchestratorCreateRefusals counts creates a node refused before // starting them, by cause: status (the node's status admits nothing new) | // capacity (the node is full, or its start slots are taken). Placement // retries each one. ApiOrchestratorCreateRefusals CounterType = "api.orchestrator.create_refusals" // ApiOrchestratorPlacementsWithoutHugepageCeiling counts hugepage sandboxes // placed under a hugepage limit on a node the limit could not bound, by // node.id and reason: no_capacity (the orchestrator reports no pool // ceiling) | no_page_size. The limit was a no-op for that placement. ApiOrchestratorPlacementsWithoutHugepageCeiling CounterType = "api.orchestrator.placements_without_hugepage_ceiling" // ApiSandboxListReads counts sandbox list requests by team and by how the // team's store read was served: disabled (no lag allowed, own read) | read // (started the shared read) | shared (joined one in flight) | hit (a live // snapshot). The read plus disabled rate is the team's store sweeps per // second; hit over the total is what the snapshot saves. ApiSandboxListReads CounterType = "api.sandbox.list.reads" // ApiTemplateListCapExceeded counts unpaginated template list requests // refused because the team has more templates than the cap, by team. ApiTemplateListCapExceeded CounterType = "api.template.list.cap_exceeded" // ApiEvictorFsOnlyAutoPause counts timeout auto-pauses whose policy asked // for a filesystem-only snapshot. Unlabeled since the fs-only version // gate was dropped: every counted eviction takes the fs-only path. ApiEvictorFsOnlyAutoPause CounterType = "api.evictor.fs_only_auto_pause" // ApiEvictorAutoPauseDegraded counts timeout auto-pauses the evictor // answered with a degrade after the node refused the memory one, by // cause: admission_refused (no retry budget, filesystem-only at the first // refusal), overstay_budget (the retry budget since the first refusal ran // out, filesystem-only), envd_grace (the guest agent refused for the whole // grace, memory pause retried without the probe), envd_grace_withheld // (that retry withheld: the record names no execution to pin it to) or // envd_grace_fs_only (that retry withheld: the sweep asks for a // filesystem-only capture, which needs the guest agent, so the sandbox // stays running). The filesystem-only causes are a subset of // ApiEvictorFsOnlyAutoPause. ApiEvictorAutoPauseDegraded CounterType = "api.evictor.auto_pause_degraded" SandboxCreateMeterName CounterType = "api.env.instance.started" TeamSandboxCreated CounterType = "e2b.team.sandbox.created" EnvdInitCalls CounterType = "orchestrator.sandbox.envd.init.calls" // envd's count of /init handlers that thawed inline after their client had gone, read // off the served /init of a first customer start that succeeded. EnvdInitUnobservedHandlers CounterType = "orchestrator.sandbox.envd.init.unobserved_handlers" // Held envd init dials that took over 500 ms on a first customer start, by how that // attempt ended. EnvdInitSlowDials CounterType = "orchestrator.sandbox.envd.init.slow_dials" // Held post-checkpoint envd re-inits stopped before they returned, by what stopped // them: a following pause, or the sandbox's Firecracker exiting. EnvdReinitCut CounterType = "orchestrator.sandbox.envd.reinit.cut" // Redirects envd answered the host with, which the host refused, by status code. EnvdRedirectsRefused CounterType = "orchestrator.sandbox.envd.redirects_refused" // EnvdCpuReport counts /init responses for VMs with spare vCPUs by the guest's // reported capacity outcome and by why the /init was sent (init: first start, // reinit after a checkpoint, or repeat). The report is diagnostic, not trusted for CPU limits. EnvdCpuReport CounterType = "orchestrator.sandbox.envd.cpu_report" // 2 MiB chunks the pre-pause envd heap collapse attempted, split by the // result attribute (collapsed|skipped): attempts = total, successful = // collapsed. EnvdCollapseChunks CounterType = "orchestrator.sandbox.envd.collapse.chunks" // Incremented by the balance_dirty_pages thread count at every 200 ms poll // for the lifetime of the process. rate() shows dirty-page throttle // intensity in real-time; 0 when no stalls are occurring. OrchestratorHostBalanceDirtyPagesThreads CounterType = "orchestrator.host.balance_dirty_pages.threads" // OrchestratorStatusOverrideRefusedCounterName counts the service status // overrides a node refused, by reason. OrchestratorStatusOverrideRefusedCounterName CounterType = "orchestrator.status.override.refused" OrchestratorSandboxKilledCounterName CounterType = "orchestrator.sandbox.killed" // OrchestratorSandboxCrashedCounterName counts sandbox executions that // ended with no recorded stop reason, labeled by cause. external_signal, // a kill the orchestrator did not send, is the one to alert on. // memory_handler_failed is a resumed sandbox whose memory could not be // served, hugepage exhaustion included; fault is Firecracker faulting. // uffd_copy_error=enomem picks out the crashes hugepage exhaustion // caused: the handler found no free hugepage to install a faulted page. // The guest causes come from Firecracker's own counters: guest_reset is // the guest resetting itself, a reboot or on Linux a kernel panic, which // the host cannot tell apart; guest_crash is a reset after a crash the // guest reported; guest_poweroff is a power-off, counted only with the // ACPI power-off device. clean_exit is the residue: Firecracker exiting 0 // with none of those counted, such as on a triple fault, or an exit that // did not wait for its final counters and so missed one. An exit 0 whose // final counters were awaited and not read is unknown instead. OrchestratorSandboxCrashedCounterName CounterType = "orchestrator.sandbox.crashed" // OrchestratorSandboxGuestRebootsCounterName counts guest resets by what // the orchestrator did about them: rebooted in place, refused_loop and // refused_timeout (not admitted), reboot_failed, and flag_off, a reset // that stopped the sandbox because rebooting it in place is not enabled. // path is running for a live sandbox, start for a reset before envd // first answered on a create or resume. OrchestratorSandboxGuestRebootsCounterName CounterType = "orchestrator.sandbox.guest_reboots" // SandboxMemoryHotplugRefused counts starts and in-place reboots refused because their // memory hotplug region cannot run here, by reason and path; reason=firecracker is a // firecracker-versions line below the hotplug release. SandboxMemoryHotplugRefused CounterType = "orchestrator.sandbox.memory_hotplug.refused" // OrchestratorSandboxPauseAdmissionCounterName counts every snapshot- // admission decision. refused is the told-the-caller-to-retry rate; // ready_after_wait counts the grace paying off — their ratio tunes the // grace flag. The envd probe has its own outcomes: envd_healthy, // envd_unhealthy (refused) and envd_unhealthy_proceeded (the memory // snapshot was taken anyway and recorded as such). OrchestratorSandboxPauseAdmissionCounterName CounterType = "orchestrator.sandbox.pause_admission" // OrchestratorSandboxCheckpointCounterName counts Checkpoint RPCs by flow — // the denominator that makes the in_place-labeled duration histograms // cuttable as a ramp (what fraction went in-place, at what success rate). OrchestratorSandboxCheckpointCounterName CounterType = "orchestrator.sandbox.checkpoint" // OrchestratorFPRResumeCounterName counts free-page-reporting resume // outcomes after a CoW window paused reporting. Guest memory is hugetlb // with no swap and no memcg reclaim, so FPR discards are the ONLY // mechanism returning freed guest pages to the host: outcome="abandoned" // is lasting per-sandbox host-memory retention and the alertable signal // for a leaked pause. OrchestratorFPRResumeCounterName CounterType = "orchestrator.sandbox.fpr_resume" // Free-page-hinting drains and runs by phase (pre-pause, periodic) and outcome. OrchestratorFPHRunCounterName CounterType = "orchestrator.sandbox.fph.run" // Stops of hinting cycles the host stopped waiting for, by outcome. OrchestratorFPHStopCounterName CounterType = "orchestrator.sandbox.fph.stop" // Bytes FC discarded across completed drains and runs, by phase. OrchestratorFPHFreedCounterName CounterType = "orchestrator.sandbox.fph.freed_bytes" // Guests the periodic hinter latched as unable to hint, and released. OrchestratorFPHLatchCounterName CounterType = "orchestrator.sandbox.fph.latch" // OrchestratorSnapshotUploadFailedCounterName counts pause-snapshot uploads // that never landed durably (budget exhausted or a non-retryable error). // A non-zero rate means lost snapshots. OrchestratorSnapshotUploadFailedCounterName CounterType = "orchestrator.snapshot.upload.failed" // OrchestratorTemplateCacheAncestorResolutionsCounterName counts each // ancestor build once per ancestor walk, by the path that resolved it // (verdict) and what landed in the child header's Builds map (resolution). // The memfile and rootfs mappings are walked separately, on each upload // attempt that reaches its header stage. OrchestratorTemplateCacheAncestorResolutionsCounterName CounterType = "orchestrator.templates.cache.ancestor_resolutions" // OrchestratorDeadStructureOutcomeCounterName counts every pass through // the drop site of a per-pause structure that outlives its readers, labeled // by structure and outcome: dropped (the flag cleared it), flag_off (the // flag kept it), none (there was nothing to drop) or, for the upload's // provisional header, misordered (the upload was created before the // snapshot was cached). Because every pass counts, a site that ran reads // nonzero whatever its flag says. The provisional header has two holders, // each with its own structure value. Templates and uploads with no // provisional header count none too, so none is not a per-pause count. OrchestratorDeadStructureOutcomeCounterName CounterType = "orchestrator.sandbox.snapshot.dead_structure_outcome" // OrchestratorDeadStructureBytesCounterName adds the size of a dropped // per-pause structure, or of one its flag kept, labeled by structure and // outcome: removed from its holder on dropped, kept on flag_off. It is not // the heap the drop saves, which also depends on how long the holder would // have kept it. upload_provisional_header adds none: its allocation is the // one template_provisional_header counts. OrchestratorDeadStructureBytesCounterName CounterType = "orchestrator.sandbox.snapshot.dead_structure_bytes" OrchestratorBlockCachePunchBytes CounterType = "orchestrator.block.cache.punch.bytes" // SandboxPauseFsQuiescedCounterName counts filesystem-only pauses by whether // the captured rootfs was frozen (quiesced=true, crash-consistent) vs a plain // sync fallback (quiesced=false). quiesced/total is the fraction of newly // minted fs-only snapshots that are safe to cold-boot / rewrite — the eligible // population for the offline envd upgrade built on top of this flag. SandboxPauseFsQuiescedCounterName CounterType = "orchestrator.sandbox.pause.fs_quiesced" // SandboxLifecycleUnstoppedCounterName counts sandbox lifecycles whose live-map // entry was reclaimed by the teardown cleanup chain rather than by an operation: // nobody marked the lifecycle stopping before the chain ran. Three teardowns // reach it — a guest exit or Firecracker death with no API teardown, a build // layer's bare deferred close, and an in-place checkpoint whose resume failed // and tore the sandbox down itself. Split by sandbox_type rather than filtered // to sandbox, because every successful build layer takes the same branch and // would otherwise dominate the bucket; dropping builds instead would make "the // build tree stopped reaching this" indistinguishable from "the build tree is // fine". It is a lower bound, never a total: the live map is in-process, so a // lifecycle spanning an orchestrator restart is never counted. SandboxLifecycleUnstoppedCounterName CounterType = "orchestrator.sandbox.lifecycle.unstopped" // SandboxResumeWPModeCounterName counts sandbox resumes by the write-protect // tracking mode the resume chose (mode=sync|async, the use-sync-wp flag // decision). This is the denominator for every sync-WP burn-in signal: // wp_resolve rates and dirty-divergence readings only come from mode=sync // sandboxes, so without this counter the fleet's sync coverage — and // whether an error rate is "all sync sandboxes" or "one loud one" — is // invisible. SandboxResumeWPModeCounterName CounterType = "orchestrator.sandbox.resume.wp_mode" // OrchestratorEnvdUpgradeAttempts counts resume-time envd live-upgrade // attempts, by result (success|delivery_failed|not_ready|panic) and // from_version/to_version. success/total is the rollout success rate; // attempts/resumes is the fire rate. OrchestratorEnvdUpgradeAttempts CounterType = "orchestrator.envd.upgrade.attempts" // OrchestratorEnvdUpgradeGated counts resumes the envd-upgrade-target flag // targeted but a gate declined, by reason — a silent no-op worth watching during // a ramp. The reasons are the resolver's and the gates' own vocabulary; read them // off `sum by (reason)` rather than from a list here, which would go stale. OrchestratorEnvdUpgradeGated CounterType = "orchestrator.envd.upgrade.gated" // OrchestratorEnvdBinaryCacheReads counts LOOKUPS of the host envd binary on // the resume path, by what the lookup found (hit|miss) and which upgrade path // asked (live|offline). Exactly one per resolution, so hit/total is the cache's // effectiveness. A standing "miss" means warms are not landing -- pair it with // binary_cache.warms{result="failed"} to see why. OrchestratorEnvdBinaryCacheReads CounterType = "orchestrator.envd.binary_cache.reads" // OrchestratorEnvdBinaryCacheDeliveries counts what a caller actually read, by // outcome (copy|stale). Separate from reads because its denominator is // different: only resolutions that go on to read the bytes reach it, and // counting both on one series would make hit/total exceed the number of // resolutions. "copy" is the cached file, which is the only thing an upgrade // ever delivers -- an upgrade whose binary is not cached is deferred rather than // served from the mount. "stale" is a refusal: the copy that carried the // resolved version was gone by delivery, so the read was skipped rather than // satisfied from a source whose bytes were never verified against it. OrchestratorEnvdBinaryCacheDeliveries CounterType = "orchestrator.envd.binary_cache.deliveries" // OrchestratorEnvdBinaryCacheWarms counts attempts to populate the host envd // binary cache, by result. Almost all of them are the background warmer's; the // exception is a lookup whose own source stat failed, which is reported here // rather than by the warm it makes no sense to spawn. "ok" means the binary is cached afterwards; // "superseded" that the warm completed but a promotion during it left nothing to // publish, which needs no retry because the next miss warms the new generation; // "suppressed" that the post-failure backoff declined to copy, and clears within // the minute; "pinned" that these exact bytes have already been judged unusable, // which lasts until a promotion changes them; "already_warming" that a warm of // the same bytes was already in flight; "bad_target" that the bytes copied but // would not run, which is a property of the promoted binary rather than of this // node; "failed" that it genuinely could not copy. // // "already_warming" rising while "ok" stays flat is a source that has stopped // answering mid-copy: the slot is held by a read that is not finishing, which no // other series can tell apart from a node that has simply not warmed yet. // // "bad_target" is the one to alert on. With the cache enabled the resolver never // probes the source, so a truncated or corrupt promotion is detectable here and // nowhere else -- at the upgrade call sites it arrives as the same // gated{reason="binary_not_cached"} a node that merely has not warmed yet emits. OrchestratorEnvdBinaryCacheWarms CounterType = "orchestrator.envd.binary_cache.warms" // OrchestratorEnvdUpgradeHandover counts live-upgrade handover items by item // (proc|retained|watcher) and result (ok|failed), reported back by the new // envd on /init. failed/(ok+failed) is the handover error rate — the // fleet-visible signal (otherwise only logged in-guest) that the new envd // dropped or degraded something it re-adopted across the swap. OrchestratorEnvdUpgradeHandover CounterType = "orchestrator.envd.upgrade.handover" // EnvdDefaultsApplied counts MEMORY RESUMES by where the default user the orchestrator // sent came from, so the derivation has a positive engagement signal rather than an // inferred one: a derivation that produced nothing and one that never ran read // identically on a dashboard. // // Resumes, not starts: the cold-boot path does its own reconstruction and is not // counted here. Split by sandbox_type, because a build's own internal resumes go // through the same path and are not customer sandbox starts. EnvdDefaultsApplied CounterType = "orchestrator.envd.defaults.applied" // EnvdDefaultsMismatch counts /init responses where the defaults envd reports as // EFFECTIVE differ from what the orchestrator sent, by field. Zero is the only // acceptable steady state: a non-zero value means a sandbox is resolving requests // against an identity nobody asked for. Note the header is written inside a guest, // so a single hostile or broken sandbox can hold this above zero; investigate via // the per-sandbox error log rather than treating the aggregate as authoritative. EnvdDefaultsMismatch CounterType = "orchestrator.envd.defaults.mismatch" // EnvdDefaultsWorkdirWithheld counts MEMORY RESUMES where the template recorded a // default workdir the orchestrator could not prove the build sent, so it was not // re-sent — the same event EnvdDefaultsApplied counts, so the two divide. An // UPPER BOUND on the population that keeps the wrong working directory after a live // upgrade: a workdir equal to the resolved user's home is withheld to no effect, and // whether it coincides cannot be decided outside the guest. EnvdDefaultsWorkdirWithheld CounterType = "orchestrator.envd.defaults.workdir_withheld" // EnvdDefaultsBuiltinFallback counts /init responses where envd reports it was never // told which user to run as, so it is serving the value it was compiled with. This is // the REALIZED loss, and the only signal that can observe one: a mismatch cannot, // because envd stores exactly what /init sent it and then reports that field back. // // Split by whether a user was sent, and by sandbox type. sent=true is a defect at any // type, because a delivered user must never read back as never-told. sent=false is only // about the population at risk at sandbox_type="sandbox": the build tree starts its own // sandboxes with no default user configured, on the host envd, so it lands in // sent=false from the first day of the rollout and would otherwise dominate the bucket. EnvdDefaultsBuiltinFallback CounterType = "orchestrator.envd.defaults.builtin_fallback" // OrchestratorEnvdOfflineUpgradeAttempts counts every OFFLINE envd upgrade // OUTCOME on the cold boot of a filesystem-only snapshot — not only the ones that // reach the rootfs binary swap — by result and from_version/to_version: // // success | swap_failed | unrecoverable | envd_too_large | envd_missing | stat_unparseable // the swap ran, or the rootfs itself declined it (see rootfs.SwapEnvdBinary) // not_quiesced // an upgrade was wanted, but the snapshot's rootfs was not frozen at pause, // so it must not be rewritten // same_version // already on the target // not_staged | downgrade | invalid_target | getversion_failed | binary_not_cached // the resolver refused or deferred the configured target // source_stalled // the host mount did not answer the target's stat in time // copy_vanished // a version was resolved and the copy carrying it was then retired, before // anything was written to the rootfs // // Every no-op except flag-off is counted, so the eligible population adds up. // Flag-off is deliberately absent: it is the whole filesystem-only population // minus the rest, already available as sandbox.create.duration{fs_only="true"}. // to_version is empty on the resolver's refusals — it has no target to name. // // On result=success a refire label says whether the rootfs ALREADY held the target // bytes. from_version cannot answer that on its own: it is a claim read off the // snapshot record, and the swap keys on that record without ever advancing it, so // an already-upgraded snapshot resolves the same upgrade on every cold boot and // rewrites identical bytes while reporting the same from_version as a genuine // upgrade. refire="false" is the count that actually moved sandboxes. The label is // absent on every other result, where nothing was compared. OrchestratorEnvdOfflineUpgradeAttempts CounterType = "orchestrator.envd.offline_upgrade.attempts" // OrchestratorFsRecoveryRuns counts every pre-boot filesystem-recovery // decision on a cold boot, by result and trigger. Recovery is journal replay // only (`e2fsck -p -E journal_only`), so the results are: // // skipped_quiesced // the rootfs was frozen at pause; nothing to replay // replayed // the journal was replayed (or regenerated, or there was nothing to do); // the fs is mountable and the boot proceeded — the expected outcome for // the admitted population, NOT a corruption signal. The reason label // splits it: journal_replayed (the superblock's needs_recovery bit was // set before the run, or e2fsck applied a repair), nothing_to_do (the // bit was clear), replay_unknown (the superblock could not be read). // failed_operational // the run did not complete a clean replay AND e2fsck may have opened the // device (an e2fsck non-replay exit, or a timeout that could have killed it // mid-write). Fail closed — the start failed — but always retryable on // another node, never a permanent snapshot verdict (its exit codes cannot // tell an unmountable filesystem apart from a transient fault). // failed_open // recovery could not run AND e2fsck provably never opened the device (the // jail could not launch it, or the host cannot exec e2fsck), so the disk is // what a flag-off cold boot would mount and the guest kernel replays the // journal itself. The boot proceeded. A host-image signal — a non-trivial // rate means the recovery tooling is broken fleet-wide (roll back), even // though sandboxes still boot. // // A bounded "reason" attribute sub-labels each result so a ramp can act on it // from a dashboard instead of grepping create-failure logs: // // replayed: nothing_to_do (no replay needed) | journal_replayed // (journal applied) — the efficacy split // failed_operational: timeout (Go deadline fired mid-run) | killed (the unit was // signalled mid-run — exit -1 or 128+N; OOM, RuntimeMaxSec, // external stop; NOT a tooling failure) | e2fsck_4 | e2fsck_8 | // e2fsck_other (e2fsck's // own non-replay exits — an unreplayable snapshot, expected and // small) | no_sentinel (ran but lost its result, or the pre-launch // device guard) // failed_open: launcher_failure (the unit failed to START — e2fsck never ran) | // exec_failure (126/127: the host could not exec e2fsck) — // both host-image regressions, roll back // skipped_quiesced: quiesced // // It never carries a raw exit code or any tenant-influenced bytes. // // trigger separates the two admitted populations: "rescue" (the request // demanded a filesystem boot of a memory snapshot) vs "legacy_fs_only" // (a filesystem-only snapshot whose pause fell back to sync). OrchestratorFsRecoveryRuns CounterType = "orchestrator.sandbox.fs_recovery.runs" // OrchestratorFsRecoveryToolingUnsupported fires once per orchestrator process // when the host e2fsck does not accept `-E journal_only` (probed against a // nonexistent device, so it reads no filesystem). Expected to be flat zero: node // images ship an e2fsprogs that has supported the option for years. A non-zero // fleet sum means some node's tooling silently no-ops recovery (the guest kernel // still replays at mount, so boots are unaffected) — a signal to fix that image, // not a per-sandbox failure. OrchestratorFsRecoveryToolingUnsupported CounterType = "orchestrator.sandbox.fs_recovery.tooling_unsupported" // TemplateBuildCmdlineArgs counts template builds by the guest kernel command line // parameters they actually booted with, after parsing and validation. This is the // engagement signal for the per-team cmdline-variant flag: a non-zero rate on a // non-empty label is proof builds ran the path, which is what the flag // reading "on" in the feature-flag service does not tell you. Zero here while the // flag is targeted is the alarm that the opt-in is silently inert. Because it // records what was APPLIED, a rejected fragment shows up as the empty label rather // than as the parameters that were asked for. TemplateBuildCmdlineArgs CounterType = "orchestrator.template.build.cmdline_args" // TemplateBuildCPUTemplate counts template builds by the digest of the CPU template // applied (empty for none) and by result: applied, rejected (the flag's template was // unusable and the build fell back to none) or none (the flag sets no template). TemplateBuildCPUTemplate CounterType = "orchestrator.template.build.cpu_template" // TemplateBuildVcpuSizing counts the VM sizing builds request, before they run; // template.build.result says what they built. TemplateBuildVcpuSizing CounterType = "orchestrator.template.build.vcpu_sizing" // TemplateBuildMemorySizing counts the memory sizing builds request, once per request before // they run; result is absent|equal|resizable|rejected, and a rejection carries its reason. TemplateBuildMemorySizing CounterType = "orchestrator.template.build.memory_sizing" // PauseResumePrefetchHarvestAttempts counts pause-resume prefetch harvest // attempts, by result (success|resume_failed|collect_failed|skipped). The // throwaway is absent from Prometheus otherwise (registration-skip), so this // is the harvest-activity / failure-rate signal. PauseResumePrefetchHarvestAttempts CounterType = "orchestrator.sandbox.pause_resume_prefetch.harvest.attempts" // Harvest throwaways whose held envd /init was served a 204, by whether envd skipped // the thaw. PauseResumePrefetchHarvestThaw CounterType = "orchestrator.sandbox.pause_resume_prefetch.harvest.thaw" ApiRedisStoragePublisherPublished CounterType = "api.redis_storage.publisher.published" ApiRedisStoragePublisherDropped CounterType = "api.redis_storage.publisher.dropped" // ApiRedisStorageExpirationIndexHealed counts sandboxes the healer re-added // to the global expiration index. Healthy steady state is zero; a sustained // non-zero rate means expiration index writes are being lost and sandboxes // would otherwise become invisible to the evictor (immortal). ApiRedisStorageExpirationIndexHealed CounterType = "api.redis_storage.expiration_index.healed" // ApiRedisStorageExpirationIndexSwept counts members removed from the // global expiration index by the evictor scan // (reason=orphan|dead_execution|invalid). ApiRedisStorageExpirationIndexSwept CounterType = "api.redis_storage.expiration_index.swept" // ApiRedisStorageExpirationIndexRescored counts live members whose index // score drifted from the stored EndTime and were re-scored by the evictor // scan. Sustained non-zero rate means score updates are being lost. ApiRedisStorageExpirationIndexRescored CounterType = "api.redis_storage.expiration_index.rescored" // ApiRedisStorageExpirationIndexDeferred counts expired members the // evictor scan moved out of its window because their sandbox is still in // a transition. A sustained high rate means transitions pile up at the // front of the index, e.g. evictions near their concurrency limit. ApiRedisStorageExpirationIndexDeferred CounterType = "api.redis_storage.expiration_index.deferred" // ApiRedisScriptCalls counts the sandbox store's Lua script runs by script // and outcome (ok|error). The store's load is mostly EVALSHA, which names // no script; this does. A nil reply is a result, so it counts as ok. ApiRedisScriptCalls CounterType = "api.redis.script.calls" // Sandbox store: the healer's index repairs, writes that gave up after // their retries, and the cluster errors the store's commands hit. ApiRedisStorageIndexHeal CounterType = "api.redis_storage.index_heal" ApiRedisStorageWriteAnomalies CounterType = "api.redis_storage.write_anomalies" ApiRedisStorageErrors CounterType = "api.redis_storage.errors" // ClientProxyResumeFlightCounterName counts callers of the per-sandbox // resume flight by role (leader|joiner|none) and result // (served|error|canceled); none is a caller that joined no flight. ClientProxyResumeFlightCounterName CounterType = "client_proxy.resume.flight.total" // ClientProxyResumeParkingRejectedCounterName counts callers shed with a // 503 because the parking lot was full when their flight first retried. ClientProxyResumeParkingRejectedCounterName CounterType = "client_proxy.resume.parking.rejected" )
const ( // Build result counters BuildResultCounterName CounterType = "template.build.result" BuildCacheResultCounterName CounterType = "template.build.cache.result" // TCP Firewall counters TCPFirewallConnectionsTotal CounterType = "orchestrator.tcpfirewall.connections.total" TCPFirewallErrorsTotal CounterType = "orchestrator.tcpfirewall.errors.total" TCPFirewallDecisionsTotal CounterType = "orchestrator.tcpfirewall.decisions.total" // Ingress proxy counters IngressProxyConnectionsBlockedTotal CounterType = "orchestrator.proxy.connections.blocked.total" // cmux counters CmuxErrorsTotal CounterType = "orchestrator.cmux.errors.total" // Sandbox routing record counters (result=ok/error) RoutingPublishTotal CounterType = "orchestrator.routing.publish.total" RoutingDeleteTotal CounterType = "orchestrator.routing.delete.total" // Firecracker net counters — global totals, no sandbox_id (low cardinality). // All carry a direction=tx/rx attribute. Per-sandbox distributions are histograms below. SandboxFCNetFails CounterType = "orchestrator.sandbox.fc.net.fails" SandboxFCNetNoAvailBuffer CounterType = "orchestrator.sandbox.fc.net.no_avail_buffer" SandboxFCNetTapIOFails CounterType = "orchestrator.sandbox.fc.net.tap_io_fails" // Firecracker block counters — global totals, no sandbox_id (low cardinality). // Carry a direction=read/write attribute where applicable. SandboxFCBlockFails CounterType = "orchestrator.sandbox.fc.block.fails" SandboxFCBlockNoAvailBuffer CounterType = "orchestrator.sandbox.fc.block.no_avail_buffer" // SandboxFCSnapshotLoadFailures counts snapshot loads Firecracker refused, // by reason. A refused load makes its template unusable rather than slow: // the sandbox cannot start on any host that reads the same snapshot, so // every attempt fails and the caller sees an error. Until this counter, // such a failure was visible only as success=false on // orchestrator.sandbox.create.duration, indistinguishable from an envd // timeout, and otherwise only in the Firecracker log line. // // reason is bounded and never carries the fault text itself, which is // influenced by snapshot contents: // vcpu_msr the snapshot carries an MSR the reading host's kernel // will not accept — a kernel difference, not a CPU one. // vcpu_other vCPU restore failed for any other reason. // missing_file a file the load opens does not exist (ENOENT): the // snapshot file removed under a starting sandbox, or a // memory backing file. // bad_request every other refusal, and where an unclassified fault // lands: memory backend, snapshot version, a snapshot // file that exists but cannot be read, or a fault a // later Firecracker words differently. // unavailable the API answered a non-400 status, so the load never // reached the snapshot. // guest_memory the memory handler exited because the hugepage pool // could not back the guest: the node is full. // uffd_exited the memory handler exited for another reason before // Firecracker answered. // transport the API socket could not be reached or replied // unintelligibly; says nothing about the snapshot. // timeout no answer before the request deadline; the load // overran and the sandbox never resumed, so it counts. // canceled the caller went away mid-load; not a broken snapshot. // // Alert on the total excluding canceled rather than on one reason: a // failure mode we have not seen still counts, under bad_request, and the // breakdown is for reading afterwards. // // cpu_template is the digest of the CPU template the snapshot's build booted with, // empty for none, so failures split by build cohort. SandboxFCSnapshotLoadFailures CounterType = "orchestrator.sandbox.fc.snapshot_load.failures" // SandboxVcpuLimit counts starts whose VM has more vCPUs than the sandbox uses, by how the CPU // limit was applied (outcome=confined|cgroup_fallback|failed) on which path (path=boot|resume). // cgroup_fallback leaves the VMM's own threads sharing the vCPU quota for the sandbox's life. SandboxVcpuLimit CounterType = "orchestrator.sandbox.vcpu_limit" // SandboxTemplateLegFaults counts a running sandbox's reads and writes that // its template's backing device failed, by leg (memfile|rootfs): the // memfile's page-fault data fetch, and the rootfs's NBD read, write and // punch. Both legs are served for the sandbox's whole life, so a device // closed under a live sandbox surfaces here rather than at snapshot load. // A failure while the serving context is already done is not counted. SandboxTemplateLegFaults CounterType = "orchestrator.sandbox.template_leg_faults" )
type EventWriter ¶
type EventWriter struct {
// contains filtered or unexported fields
}
type FloatTimerFactory ¶
type FloatTimerFactory struct {
// contains filtered or unexported fields
}
FloatTimerFactory records duration as fractional milliseconds so sub-ms operations aren't truncated to 0. The duration histogram and event counter share <metricName> (rate()-friendly); only the bytes counter splits out to <metricName>.size so Grafana's unit detection doesn't conflate ms with By.
func NewFloatTimerFactory ¶
func NewFloatTimerFactory( meter metric.Meter, metricName, durationDescription, bytesDescription string, ) (FloatTimerFactory, error)
func (*FloatTimerFactory) Record ¶
func (f *FloatTimerFactory) Record(ctx context.Context, dur time.Duration, total int64, attrs metric.MeasurementOption)
type GaugeFloatType ¶
type GaugeFloatType string
const (
SandboxCpuUsedGaugeName GaugeFloatType = "e2b.sandbox.cpu.used"
)
type GaugeIntType ¶
type GaugeIntType string
type HistogramType ¶
type HistogramType string
const ( // Build timing histograms FPHRunDurationName HistogramType = "orchestrator.sandbox.fph.duration" FPHStopDurationName HistogramType = "orchestrator.sandbox.fph.stop.duration" FPHRunFaultsName HistogramType = "orchestrator.sandbox.fph.run.faults" BuildDurationHistogramName HistogramType = "template.build.duration" BuildPhaseDurationHistogramName HistogramType = "template.build.phase.duration" BuildStepDurationHistogramName HistogramType = "template.build.step.duration" NetworkSlotReturnDurationName HistogramType = "orchestrator.network.slot.return.duration" NetworkEgressRetirementDurationName HistogramType = "orchestrator.network.egress.retirement.duration" OrchestratorBlockCachePunchDuration HistogramType = "orchestrator.block.cache.punch.duration" OrchestratorBlockCacheCloseDuration HistogramType = "orchestrator.block.cache.close.duration" // Sandbox timing histograms OrchestratorSandboxCreateDurationName HistogramType = "orchestrator.sandbox.create.duration" WaitForEnvdDurationHistogramName HistogramType = "orchestrator.sandbox.envd.init.duration" EnvdInitTimestampAgeHistogramName HistogramType = "orchestrator.sandbox.envd.init.timestamp_age" EnvdInitClockCorrectionHistogramName HistogramType = "orchestrator.sandbox.envd.init.clock_correction" GuestSyncDurationHistogramName HistogramType = "orchestrator.sandbox.guest_sync.duration" PauseDurationHistogramName HistogramType = "orchestrator.sandbox.pause.duration" GuestRebootDurationHistogramName HistogramType = "orchestrator.sandbox.guest_reboot.duration" SnapshotProcessMemoryDurationName HistogramType = "orchestrator.sandbox.snapshot.process_memory.duration" SnapshotProcessRootfsDurationName HistogramType = "orchestrator.sandbox.snapshot.process_rootfs.duration" SnapshotRootfsSealDurationName HistogramType = "orchestrator.sandbox.snapshot.rootfs_seal.duration" SnapshotGuestFreezeDurationName HistogramType = "orchestrator.sandbox.snapshot.guest_freeze.duration" CheckpointDurationName HistogramType = "orchestrator.sandbox.checkpoint.duration" SnapshotMemorySealDurationName HistogramType = "orchestrator.sandbox.snapshot.memory_seal.duration" // OrchestratorSandboxExecutionDurationName is one sample per Firecracker // run, so a sandbox that is paused and resumed records one per run. OrchestratorSandboxExecutionDurationName HistogramType = "orchestrator.sandbox.execution.duration" // OrchestratorEnvdUpgradeDurationName is the wall-time of a resume-time envd // live-upgrade (delivery + trigger + WaitForEnvd) = overhead added to the // resume. Labeled by result. OrchestratorEnvdUpgradeDurationName HistogramType = "orchestrator.envd.upgrade.duration" // OrchestratorEnvdUpgradePhaseDurationName splits that wall-time by phase // (resolve|deliver|ready). deliver and ready have INDEPENDENT budgets (30 s // and 15 s) and the combined histogram above cannot say which one a slow // upgrade is approaching, so a delivery running past its own deadline has to // be reconstructed from log timestamps. resolve is not in the combined // histogram at all -- it runs before it starts timing -- yet it is the largest // cost on a cold node, because probing the target's version execs the binary // off a network filesystem, which demand-pages it in small reads. Labeled by // phase and result. OrchestratorEnvdUpgradePhaseDurationName HistogramType = "orchestrator.envd.upgrade.phase.duration" // OrchestratorEnvdOfflineUpgradeDurationName is the wall-time of the offline // rootfs envd swap (jailed debugfs), recorded once per swap attempt. Catches // pathological rewrites; the swap runs in the cold-boot PreBootFn, so it adds // directly to resume latency. OrchestratorEnvdOfflineUpgradeDurationName HistogramType = "orchestrator.envd.offline_upgrade.duration" // OrchestratorEnvdBinaryCacheSourceStatDurationName is the wall-time of the // resume path's stat of the host envd binary on its mount, recorded when the // stat returns -- healthy or not, and including stats every lookup had already // given up on. Its tail is what the lookup's stat budget is set against. OrchestratorEnvdBinaryCacheSourceStatDurationName HistogramType = "orchestrator.envd.binary_cache.source_stat.duration" // OrchestratorFsRecoveryDurationName is the wall-time of the jailed pre-boot // journal-replay run on a cold boot, recorded for every outcome the run reaches // (replayed/failed_operational) — only skipped_quiesced, // which never runs e2fsck, has no duration sample. Replay is journal-bounded, so // this should stay sub-second even on large filesystems. Labeled like // OrchestratorFsRecoveryRuns. OrchestratorFsRecoveryDurationName HistogramType = "orchestrator.sandbox.fs_recovery.duration" // Pre-pause envd heap collapse round-trip duration (the pause-path cost of // POST /collapse: network plus envd's madvise work), recorded once per pause // when the collapse-envd-heap flag is on. EnvdCollapseDurationHistogramName HistogramType = "orchestrator.sandbox.envd.collapse.duration" // Background memfile dedup latency: provisional header creation at pause to // the durable-header swap. Recorded once per swap; no attributes. OrchestratorSandboxMemfileDedupDurationName HistogramType = "orchestrator.sandbox.memfile_dedup.duration" // How long snapshot admission actually waited whenever it waited, labeled // by outcome (ready_after_wait/refused only). OrchestratorSandboxPauseAdmissionWaitDurationName HistogramType = "orchestrator.sandbox.pause_admission.wait.duration" // How long a start waited for one of the node's start slots (the // MaxStartingInstancesPerNode semaphore), one sample per acquire attempt, // labeled by kind (create|resume|checkpoint|harvest) and outcome // (acquired|cancelled|refused). A create never waits -- it takes a slot or // is refused at once -- so its samples are zero and only its count reads; // the other kinds wait up to the acquire timeout, and cancelled is that // timeout or the caller's context ending the wait. OrchestratorSandboxStartGateWaitDurationName HistogramType = "orchestrator.sandbox.start_gate.wait.duration" // Pause-resume prefetch harvest cost, recorded once per harvest attempt. // duration is the SLOT-HOLD cost alone — the throwaway resume, its trace // collection and its reap — which is what the harvest-timeout flag caps. // persist_wait is the separate, resource-free wait on the in-flight snapshot // upload that the mapping has to be written after; keeping it out of duration // is what lets "harvests at the timeout" stay a meaningful signal. // pages is the harvested trace size (distinct 2 MiB blocks), recorded only on // success, so its bottom bucket surfaces the empty-trace (idle-at-pause) rate. PauseResumePrefetchHarvestDurationName HistogramType = "orchestrator.sandbox.pause_resume_prefetch.harvest.duration" PauseResumePrefetchHarvestPagesName HistogramType = "orchestrator.sandbox.pause_resume_prefetch.harvest.pages" PauseResumePrefetchSealWaitDurationName HistogramType = "orchestrator.sandbox.pause_resume_prefetch.seal_wait.duration" PauseResumePrefetchPersistWaitDurationName HistogramType = "orchestrator.sandbox.pause_resume_prefetch.persist_wait.duration" // Sandbox startup working-set histograms: demand-fault pages/bytes a guest // needed to reach a successful envd init, recorded once per start. Sampled // per start (not per fault), so histogram_quantile yields per-sandbox // percentiles. EnvdFreezeDurationHistogramName HistogramType = "orchestrator.sandbox.envd.freeze.duration" EnvdFreezeSweepHistogramName HistogramType = "orchestrator.sandbox.envd.freeze.sweep" EnvdFreezeWaitHistogramName HistogramType = "orchestrator.sandbox.envd.freeze.wait" EnvdFreezeVisitedHistogramName HistogramType = "orchestrator.sandbox.envd.freeze.visited" EnvdFreezeAuditHistogramName HistogramType = "orchestrator.sandbox.envd.freeze.audit" EnvdFreezeCgroupsHistogramName HistogramType = "orchestrator.sandbox.envd.freeze.cgroups" EnvdUnfreezeDurationHistogramName HistogramType = "orchestrator.sandbox.envd.unfreeze.duration" // EnvdFsthawDurationHistogramName is one sample per thaw attempt after an // in-place resume of a filesystem-only checkpoint; the last failed attempt // is followed by the sandbox being torn down. EnvdFsthawDurationHistogramName HistogramType = "orchestrator.sandbox.envd.fsthaw.duration" // Memory protection configured on the guest envd's cgroup chain, as envd reports it // on /init, recorded at most once per start (when the first /init's header decodes): // kind=request is envd's own memory.min, kind=floor the minimum over the chain below // the root. In MiB, the unit the template renders the protection in, so the two compare // without conversion; the truncation that costs is a setting below 1 MiB, which records // as 0. Capped at the sandbox's RAM, so that one unbounded request cannot cost the whole // series its bucket resolution: the exporter aggregates every histogram as base-2 // exponential at a scale it lowers only to fit the observed range, and discards // per-instrument boundaries, so the range the series spans is the resolution every // sample in it gets. EnvdMemoryProtectionHistogramName HistogramType = "orchestrator.sandbox.envd.memory.protection" UffdStartupPagesHistogramName HistogramType = "orchestrator.sandbox.uffd.startup.pages" UffdStartupSourcePagesHistogramName HistogramType = "orchestrator.sandbox.uffd.startup.source_pages" UffdStartupBytesHistogramName HistogramType = "orchestrator.sandbox.uffd.startup.bytes" // Demand faults a guest needed after its start, per window since envd init. UffdPostStartPagesHistogramName HistogramType = "orchestrator.sandbox.uffd.post_start.pages" UffdPostStartSourcePagesHistogramName HistogramType = "orchestrator.sandbox.uffd.post_start.source_pages" UffdPostStartServeTimeHistogramName HistogramType = "orchestrator.sandbox.uffd.post_start.serve_time" UffdPostStartSourceServeTimeHistogramName HistogramType = "orchestrator.sandbox.uffd.post_start.source_serve_time" // TCP Firewall histograms TCPFirewallConnectionDurationHistogramName HistogramType = "orchestrator.tcpfirewall.connection.duration" TCPFirewallConnectionsPerSandboxHistogramName HistogramType = "orchestrator.tcpfirewall.connections.per_sandbox" // Ingress proxy histograms IngressProxyConnectionDurationHistogramName HistogramType = "orchestrator.proxy.connection.duration" IngressProxyConnectionsPerSandboxHistogramName HistogramType = "orchestrator.proxy.connections.per_sandbox" // ClientProxyResumeParkingWaitDurationName is how long a request waited // in the parking lot, labeled by outcome // (served|budget_exhausted|canceled|error). ClientProxyResumeParkingWaitDurationName HistogramType = "client_proxy.resume.parking.wait.duration" )
const ( ApiRedisStoragePublisherPublishDuration HistogramType = "api.redis_storage.publisher.publish.duration" // ApiRedisScriptDuration is the round trip of one Lua script run against // the sandbox store, by script (see ApiRedisScriptCalls). ApiRedisScriptDuration HistogramType = "api.redis.script.duration" // ApiSandboxListAge is the age of a served sandbox list, by outcome only // (see ApiSandboxListReads; a per-team histogram would multiply the counter's // series by its buckets once the flag is fleet-wide), recorded only for teams whose lag // flag is set: for a read, the store sweep's duration; for a shared read, // the wait from the sweep's start to the joiner's result; for a hit, how // far the snapshot lagged the store. Tune the list lag flag against it: hits // parked at the allowance mean it decides the team's lifetime; sweeps // longer than the lifetime mean the store is being read as fast as the // allowance permits. Exported with explicit buckets (metrics.go). ApiSandboxListAge HistogramType = "api.sandbox.list.age" // ApiRedisStorageListGets is the commands one bulk record read issued, by // the sandbox list, the evictor or the node reconcile: one GET per record // on the sandbox-tagged keys. ApiRedisStorageListGets HistogramType = "api.redis_storage.list.gets" // Firecracker net histograms — per-sandbox distribution per metrics flush, no sandbox_id. // Firecracker serializes SharedIncMetric as per-flush deltas (default flush interval: 60 s). // Symmetric TX/RX metrics carry a direction=tx/rx attribute; TX-only metrics always use direction=tx. SandboxFCNetBytes HistogramType = "orchestrator.sandbox.fc.net.bytes" SandboxFCNetPackets HistogramType = "orchestrator.sandbox.fc.net.packets" SandboxFCNetCount HistogramType = "orchestrator.sandbox.fc.net.count" SandboxFCNetRateLimiterThrottled HistogramType = "orchestrator.sandbox.fc.net.rate_limiter_throttled" // TX-only: no RX equivalent in Firecracker metrics. SandboxFCNetRateLimiterEventCount HistogramType = "orchestrator.sandbox.fc.net.rate_limiter_event_count" SandboxFCNetRemainingReqs HistogramType = "orchestrator.sandbox.fc.net.remaining_reqs" // Firecracker block histograms — per-sandbox distribution per metrics flush, no sandbox_id. // Symmetric read/write metrics carry a direction=read/write attribute. SandboxFCBlockBytes HistogramType = "orchestrator.sandbox.fc.block.bytes" SandboxFCBlockCount HistogramType = "orchestrator.sandbox.fc.block.count" SandboxFCBlockQueueEventCount HistogramType = "orchestrator.sandbox.fc.block.queue_event_count" SandboxFCBlockRateLimiterThrottled HistogramType = "orchestrator.sandbox.fc.block.rate_limiter_throttled" SandboxFCBlockRateLimiterEventCount HistogramType = "orchestrator.sandbox.fc.block.rate_limiter_event_count" SandboxFCBlockIOEngineThrottled HistogramType = "orchestrator.sandbox.fc.block.io_engine_throttled" SandboxFCBlockRemainingReqs HistogramType = "orchestrator.sandbox.fc.block.remaining_reqs" // Cold-boot InstanceStart latency; Firecracker builds the VM before answering. SandboxFCInstanceStartDuration HistogramType = "orchestrator.sandbox.fc.instance_start.duration" SnapshotDiffBytes HistogramType = "orchestrator.sandbox.snapshot.diff.bytes" SnapshotDiffRatio HistogramType = "orchestrator.sandbox.snapshot.diff.ratio" SnapshotTotalBytes HistogramType = "orchestrator.sandbox.snapshot.total.bytes" UploadUncompressedBytes HistogramType = "orchestrator.sandbox.upload.uncompressed.bytes" UploadCompressedBytes HistogramType = "orchestrator.sandbox.upload.compressed.bytes" UploadCompressionRatio HistogramType = "orchestrator.sandbox.upload.compression.ratio" )
type LogProvider ¶
type LogProvider interface {
log.LoggerProvider
Shutdown(ctx context.Context) error
}
LogProvider extends log.LoggerProvider with a Shutdown method so the batch processor and exporter are properly flushed on exit.
func NewLogProvider ¶
func NewLogProvider(ctx context.Context, res *resource.Resource, extraOpts ...otlploggrpc.Option) (LogProvider, error)
func NewNoopLogProvider ¶
func NewNoopLogProvider() LogProvider
type ObservableCounterType ¶
type ObservableCounterType string
const ( ApiOrchestratorSbxCreateSuccess ObservableCounterType = "api.orchestrator.sandbox.create.success" ApiOrchestratorSbxCreateFailure ObservableCounterType = "api.orchestrator.sandbox.create.failure" OrchestratorHostPressureStall ObservableCounterType = "orchestrator.host.pressure.stall" OrchestratorHostReclaimStalls ObservableCounterType = "orchestrator.host.reclaim.stalls" OrchestratorHostReclaimPages ObservableCounterType = "orchestrator.host.reclaim.pages" OrchestratorHostInterrupts ObservableCounterType = "orchestrator.host.interrupts" )
type ObservableUpDownCounterType ¶
type ObservableUpDownCounterType string
const ( OrchestratorSandboxCountMeterName ObservableUpDownCounterType = "orchestrator.env.sandbox.running" OrchestratorSandboxNetworkModeCountMeterName ObservableUpDownCounterType = "orchestrator.sandbox.running.by_network_mode" OrchestratorBlockCachePunchInflight ObservableUpDownCounterType = "orchestrator.block.cache.punch.inflight" ClientProxyServerConnectionsMeterCounterName ObservableUpDownCounterType = "client_proxy.proxy.server.connections.open" ClientProxyPoolConnectionsMeterCounterName ObservableUpDownCounterType = "client_proxy.proxy.pool.connections.open" ClientProxyPoolSizeMeterCounterName ObservableUpDownCounterType = "client_proxy.proxy.pool.size" ClientProxyResumeParkingActiveName ObservableUpDownCounterType = "client_proxy.resume.parking.active" OrchestratorProxyServerConnectionsMeterCounterName ObservableUpDownCounterType = "orchestrator.proxy.server.connections.open" OrchestratorProxyPoolConnectionsMeterCounterName ObservableUpDownCounterType = "orchestrator.proxy.pool.connections.open" OrchestratorProxyPoolSizeMeterCounterName ObservableUpDownCounterType = "orchestrator.proxy.pool.size" BuildCounterMeterName ObservableUpDownCounterType = "api.env.build.running" EvictionsRunningCounterName ObservableUpDownCounterType = "api.evictor.evictions.running" TCPFirewallActiveConnections ObservableUpDownCounterType = "orchestrator.tcpfirewall.connections.active" ApiRedisStoragePublisherQueueDepth ObservableUpDownCounterType = "api.redis_storage.publisher.queue.depth" )
type Option ¶
type Option func(*options)
func WithDeltaTemporality ¶
func WithDeltaTemporality() Option
WithDeltaTemporality exports synchronous counters and histograms as deltas and lifts the SDK's cardinality limit for those kinds only. Under cumulative temporality the SDK keeps every attribute set until the process exits, so a per-team attribute would exhaust the limit and fold new series into one overflow series without labels; under delta it holds only the sets recorded in the current export interval. The collector receiving these metrics must convert them back to cumulative (deltatocumulative) and must be the only collector receiving them, so every point of a series reaches the same one. A delta export that fails past the exporter's retries is lost for good, where a cumulative series caught up on the next success: an outage of the node-local collector undercounts these metrics for its duration.
func WithResourceAttributes ¶
WithResourceAttributes adds attributes to the telemetry resource.
type Stopwatch ¶
type Stopwatch struct {
// contains filtered or unexported fields
}
type TimerFactory ¶
type TimerFactory struct {
// contains filtered or unexported fields
}
func NewTimerFactory ¶
func NewTimerFactory( blocksMeter metric.Meter, metricName, durationDescription, bytesDescription, counterDescription string, ) (TimerFactory, error)
type ZapFieldToOTELAttributeEncoder ¶
func (*ZapFieldToOTELAttributeEncoder) AddArray ¶
func (z *ZapFieldToOTELAttributeEncoder) AddArray(_ string, _ zapcore.ArrayMarshaler) error
func (*ZapFieldToOTELAttributeEncoder) AddBinary ¶
func (z *ZapFieldToOTELAttributeEncoder) AddBinary(key string, value []byte)
func (*ZapFieldToOTELAttributeEncoder) AddBool ¶
func (z *ZapFieldToOTELAttributeEncoder) AddBool(key string, value bool)
func (*ZapFieldToOTELAttributeEncoder) AddByteString ¶
func (z *ZapFieldToOTELAttributeEncoder) AddByteString(key string, value []byte)
func (*ZapFieldToOTELAttributeEncoder) AddComplex64 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddComplex64(key string, value complex64)
func (*ZapFieldToOTELAttributeEncoder) AddComplex128 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddComplex128(key string, value complex128)
func (*ZapFieldToOTELAttributeEncoder) AddDuration ¶
func (z *ZapFieldToOTELAttributeEncoder) AddDuration(key string, value time.Duration)
func (*ZapFieldToOTELAttributeEncoder) AddFloat32 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddFloat32(key string, value float32)
func (*ZapFieldToOTELAttributeEncoder) AddFloat64 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddFloat64(key string, value float64)
func (*ZapFieldToOTELAttributeEncoder) AddInt ¶
func (z *ZapFieldToOTELAttributeEncoder) AddInt(key string, value int)
func (*ZapFieldToOTELAttributeEncoder) AddInt8 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddInt8(key string, value int8)
func (*ZapFieldToOTELAttributeEncoder) AddInt16 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddInt16(key string, value int16)
func (*ZapFieldToOTELAttributeEncoder) AddInt32 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddInt32(key string, value int32)
func (*ZapFieldToOTELAttributeEncoder) AddInt64 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddInt64(key string, value int64)
func (*ZapFieldToOTELAttributeEncoder) AddObject ¶
func (z *ZapFieldToOTELAttributeEncoder) AddObject(_ string, _ zapcore.ObjectMarshaler) error
func (*ZapFieldToOTELAttributeEncoder) AddReflected ¶
func (z *ZapFieldToOTELAttributeEncoder) AddReflected(key string, value any) error
func (*ZapFieldToOTELAttributeEncoder) AddString ¶
func (z *ZapFieldToOTELAttributeEncoder) AddString(key, value string)
func (*ZapFieldToOTELAttributeEncoder) AddTime ¶
func (z *ZapFieldToOTELAttributeEncoder) AddTime(key string, value time.Time)
func (*ZapFieldToOTELAttributeEncoder) AddUint ¶
func (z *ZapFieldToOTELAttributeEncoder) AddUint(key string, value uint)
func (*ZapFieldToOTELAttributeEncoder) AddUint8 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddUint8(key string, value uint8)
func (*ZapFieldToOTELAttributeEncoder) AddUint16 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddUint16(key string, value uint16)
func (*ZapFieldToOTELAttributeEncoder) AddUint32 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddUint32(key string, value uint32)
func (*ZapFieldToOTELAttributeEncoder) AddUint64 ¶
func (z *ZapFieldToOTELAttributeEncoder) AddUint64(key string, value uint64)
func (*ZapFieldToOTELAttributeEncoder) AddUintptr ¶
func (z *ZapFieldToOTELAttributeEncoder) AddUintptr(key string, value uintptr)
func (*ZapFieldToOTELAttributeEncoder) OpenNamespace ¶
func (z *ZapFieldToOTELAttributeEncoder) OpenNamespace(_ string)