# Functions

Convenience re-export of [hex.DecodeString] to allow generating code without touching imports in instrumented file.
ForceFlush forces a flush of the metrics, in the case autometrics is pushing metrics to an OTLP collector.
Init sets up the metrics required for autometrics' decorated functions and registers them to the Prometheus exporter.
Instrument called in a defer statement wraps the body of a function with automatic instrumentation.
No description provided by the author
PreInstrument runs the "before wrappee" part of instrumentation.
No description provided by the author
No description provided by the author
WithBranch sets the name of the branch to export with the metrics.
No description provided by the author
WithCommit sets the commit of the codebase to export with the metrics.
No description provided by the author
WithHistogramBuckets sets the buckets to use for the latency histograms.
WithLogger sets the logger to use when initializing autometrics.
WithMeterName sets the name of the meter to use for opentelemetry metrics.
Convenience re-export of [autometrics.WithNewTraceId] to avoid needing multiple imports in instrumented file.
WithPushCollectorURL enables Pushing metrics to a remote location, and sets the URL of the collector to target.
WithPushHeaders allows adding headers to the payload of metrics when pushed to the collector (for BasicAuth authentication for example) The default value is empty.
WlthPushHTTP sets the metrics pushing mechanism to use the HTTP format over gRPC The default value is to use gRPC.
WlthPushInsecure allows to use insecure (clear text) connections between the codebase and the metrics collector.
WithPushJobName sets the name of job to use when pushing metrics.
WithPushPeriod sets the duration between consecutive metrics pushes.
WithPushTimeout sets the timeout duration of a single metric push The standard `OTEL_METRIC_EXPORT_TIMEOUT` environment variable overrides this initialization argument.
WithRepoProvider sets the provider of the repository containing the codebase being instrumented.
WithRepoURL sets the URL of the repository containing the codebase being instrumented.
WithService sets the name of the current service, to export with the metrics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithVersion sets the version of the codebase to export with the metrics.

# Constants

AutometricsSpecVersion is the version of the specification the library follows The specifications can be found in https://github.com/autometrics-dev/autometrics-shared/tree/main/specs.
AutometricsVersionLabel is the openTelemetry attribute that describes the version of the Autometrics specification the library follows.
BranchLabel is the openTelemetry attribute that describes the branch of the build of the monitored codebase.
BuildInfo is the name of the openTelemetry metric for the version of the monitored codebase.
CallerFunctionLabel is the openTelemetry attribute that describes the name of the function that called the current function.
CallerModuleLabel is the openTelemetry attribute that describes the module of the function that called the current function.
CommitLabel is the openTelemetry attribute that describes the commit of the monitored codebase.
FunctionCallsConcurrentName is the name of the openTelemetry metric for the number of simulateneously active calls to specific functions.
FunctionCallsCountName is the name of the openTelemetry metric for the counter of calls to specific functions.
FunctionCallsDurationName is the name of the openTelemetry metric for the duration histogram of calls to specific functions.
FunctionLabel is the openTelemetry attribute that describes the function name.
JobNameLabel is the openTelemetry attribute that describes the job producing the metrics.
ModuleLabel is the openTelemetry attribute that describes the module name that contains the function.
RepositoryProviderLabel is the openTelemetry attribute that describes the service provider for the monitored service repository url.
RepositoryURLLabel is the openTelemetry attribute that describes the URL at which the repository containing the monitored service can be found.
ResultLabel is the openTelemetry attribute that describes whether a function call is successful.
ServiceNameLabel is the openTelemetry attribute that describes the name of the Service being monitored.
SloNameLabel is the openTelemetry attribute that describes the name of the Service Level Objective.
TargetLatencyLabel is the openTelemetry attribute that describes the latency to respect to match the Service Level Objective.
TargetSuccessRateLabel is the openTelemetry attribute that describes the percentage of calls that must succeed to match the Service Level Objective.
VersionLabel is the openTelemetry attribute that describes the version of the monitored codebase.

# Variables

No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

Logger is an interface for logging autometrics-related events.
This is a reexport to allow using only the current package at call site.
This is a reexport to allow using only the current package at call site.
No description provided by the author