Перейти к содержимому

Эта страница ещё не переведена и показана на английском.

Emitted telemetry

Every span, metric, log record, and resource attribute Elide emits on its own: names, instrumentation scopes, units, attributes, and when each is recorded.

На этой странице

What Elide records without code changes, once a destination is configured. Telemetry your code creates keeps the names and scopes you give it.

Resource

Every span, metric, log record, and profile from one process carries the same resource.

AttributeValue
service.nameOTEL_SERVICE_NAME, else service.name in elide.pkl, else unknown_service:elide
service.versionservice.version
service.namespaceservice.namespace
deployment.environment.nameservice.environment
telemetry.sdk.nameelide
telemetry.sdk.versionThe Elide version
anyresource in elide.pkl and OTEL_RESOURCE_ATTRIBUTES

When the same attribute is set in more than one place, flags win over variables, and variables over elide.pkl.

Instrumentation scopes

ScopeSignals
dev.elide.runtimeHTTP server and client spans, elide build, elide test, and elide install spans, runtime metrics, error records, Elide’s own log records
dev.elide.runtime.profilerGuest CPU profiles
consoleCaptured console.* output (JavaScript)
logger name, e.g. root, app.dbCaptured Python logging records

Spans

HTTP server spans

One SERVER span per request served by elide serve, a fetch handler, or a node:http server, when runtime.traces is on.

FieldValue
NameThe method (GET, POST, …), or GET /users/:id once a node:http route is known; HTTP for a nonstandard method
ParentThe caller’s traceparent, when valid; otherwise a new trace
StatusERROR for a 5xx response, an abandoned response, or a reset connection
AttributeWhen
http.request.methodAlways. Methods outside the standard nine are _OTHER.
http.request.method_originalFor _OTHER
url.schemeAlways
url.pathAlways
url.queryWhen the target has a query string. The values of AWSAccessKeyId, Signature, sig, and X-Goog-Signature are redacted; other values are exported as sent, so keep secrets out of URLs.
network.protocol.versionAlways: 1.0, 1.1, or 2
server.address, server.portFrom the Host header
user_agent.originalWhen sent
client.address, network.peer.address, network.peer.portWhen the peer is known
http.response.status_codeWhen a response was sent
http.request.body.size, http.response.body.sizeWhen nonzero or known
http.routenode:http servers, when set by the handler or a router; see Routes
error.typeabandoned, reset, or the 5xx status code
baggage.<key>For keys listed in propagation.baggage.spanAttributes

A handler that throws adds an exception event to the server span and sets its status to ERROR.

HTTP client spans

One CLIENT span per outgoing fetch request, when runtime.traces is on.

FieldValue
NameThe method: GET, POST, …
ParentThe span active where fetch was called
StatusERROR for a 4xx or 5xx response, or a failed request
AttributeWhen
http.request.method, http.request.method_originalAs for server spans
url.fullAlways
server.address, server.portFrom the URL
http.response.status_codeWhen a response arrived
network.protocol.versionWhen known
http.response.body.sizeWhen known
error.typeThe 4xx or 5xx status code, or the failure kind

Toolchain

Recorded by elide build, elide test, and elide install. The root span continues a TRACEPARENT (and TRACESTATE) from the environment.

SpanParentAttributes
elide.build, elide.test, elide.installTRACEPARENT, or a new traceelide.command, process.exit.code, elide.ci.*; ERROR status for a nonzero exit code
elide.build.<stage>Command spanelide.build.category
elide.task <name>Command or stage spanelide.build.category, elide.build.task, elide.build.outcome, elide.build.cache_hit
elide.task.<operation>Task spansame as tasks
test nameelide.testelide.test.engine, elide.test.name, elide.test.status, elide.test.suite, elide.test.file, elide.test.source_set, elide.test.failure; ERROR status on failure

CI attributes come from the provider’s own variables:

AttributeGitHub ActionsGitLabBuildkiteCircleCI
elide.ci.providergithubgitlabbuildkitecircleci
elide.ci.pipeline.nameGITHUB_WORKFLOWCI_PIPELINE_NAMEBUILDKITE_PIPELINE_SLUG—
elide.ci.pipeline.run.idGITHUB_RUN_IDCI_PIPELINE_IDBUILDKITE_BUILD_IDCIRCLE_WORKFLOW_ID
elide.ci.pipeline.run.attemptGITHUB_RUN_ATTEMPT———
elide.ci.pipeline.run.urlbuilt from GITHUB_SERVER_URLCI_PIPELINE_URLBUILDKITE_BUILD_URLCIRCLE_BUILD_URL
elide.ci.job.nameGITHUB_JOBCI_JOB_NAMEBUILDKITE_LABELCIRCLE_JOB
elide.ci.vcs.refGITHUB_REF_NAMECI_COMMIT_REF_NAMEBUILDKITE_BRANCHCIRCLE_BRANCH
elide.ci.vcs.revisionGITHUB_SHACI_COMMIT_SHABUILDKITE_COMMITCIRCLE_SHA1
elide.ci.vcs.repositoryGITHUB_REPOSITORYCI_PROJECT_PATH——

Any other CI that sets CI gets elide.ci.provider = generic.

Span limits

A span still open when the process exits is ended and exported with elide.span.reclaimed = true. So is the oldest open span once more than 16,384 are open at the same time.

Metrics

Runtime metrics are recorded when runtime.metrics is on and some destination accepts metrics.

InstrumentKindUnitAttributes
http.server.request.durationHistogramshttp.request.method, url.scheme, network.protocol.version, http.response.status_code, error.type
http.server.active_requestsUpDownCounter{request}http.request.method, url.scheme
elide.http.server.rejected_requestsCounter{request}http.response.status_code
http.client.request.durationHistogramshttp.request.method, server.address, server.port, url.scheme, network.protocol.version, http.response.status_code, error.type
process.cpu.timeCounter (observable)scpu.mode = user, system
process.memory.usageUpDownCounter (observable)By—
process.thread.countUpDownCounter (observable){thread}—
process.unix.file_descriptor.countUpDownCounter (observable){file_descriptor}—
process.uptimeGauge (observable)s—
elide.errorsCounter{error}error.type, elide.error.origin

Process metrics are collected on Linux, macOS, and Windows. elide.http.server.rejected_requests counts requests Elide answered itself because they were malformed or unsupported; they never reach your handler.

HTTP duration histograms use the bucket boundaries 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 seconds and carry exemplars of their request span.

elide.error.origin values:

ValueRecorded for
uncaughtAn uncaught exception
rejectionAn unhandled promise rejection
handlerA request handler that threw or rejected
crashA crash of an earlier process, reported by the next one
guest_apispan.recordException(…) in your code

Log records

RecordScopeSeverityAttributes
Errordev.elide.runtime; the span’s scope for recordExceptionERRORevent.name = exception, exception.type, exception.message, exception.stacktrace, elide.error.origin
Crash reportdev.elide.runtimeFATALas above, plus elide.crash.origin, elide.crash.file, elide.crash.signature, elide.crash.exit_code, elide.crash.subcommand, elide.crash.build_id, process.pid
Elide’s own logdev.elide.runtimeat or above runtime.logselide.log.target, code.file.path, code.line.number
console.*consoleconsole.trace TRACE, debug DEBUG, log and info INFO, warn WARN, error and assert ERROR—
Python loggingthe logger’s namemapped from the record levelcode.file.path, code.function.name, code.line.number, and exception.* with exc_info

Every record emitted inside a span carries its trace id, span id, and trace flags.

Profiles

Experimental. One OTLP CPU profile per export (every 30 seconds and at exit) in the dev.elide.runtime.profiler scope, with samples/count values and a cpu/nanoseconds period. Each sample links to the span that was active on its thread. See Profiles.

Not yet recorded

  • Garbage collection and event-loop delay metrics.
  • Client spans and traceparent injection for node:http client requests and Python HTTP clients.
  • Spans for engine start, module loading, or worker threads.

Была ли эта страница полезной?