# Packages

No description provided by the author

# Functions

DefaultJobName returns the default job name to use when pushing metrics to a collector.
FillBuildInfo adds the relevant build information to the current context.
FillTracingAndCallerInfo ensures the context has a traceID and a spanID, and looks for relevant caller information to add in the context as well.
GenerateTraceId generates a new TraceID with a Pseudo-random number generator.
GetAlertConfiguration returns default information if the context did not contain any alerting configuration.
GetBranch returns the branch of the build of the codebase being instrumented.
GetBuildInfo returns default information if the context did not contain any build information.
GetCallInfo returns default information if the context did not contain any build information.
GetCommit returns the commit of the codebase being instrumented.
GetLogger returns the current logging interface for Autometrics.
GetOutboundIP returns the preferred outbound ip of this machine.
GetParentSpanID returns (_, false) if the context did not contain the parent's span id (including when we are in the root span).
GetPushJobName returns the job name to use when the codebase being instrumented is pushing metrics to an OTEL Collector.
GetPushJobURL returns the job url to use when the codebase being instrumented is pushing metrics to an OTEL Collector.
GetRepositoryProvider returns the service provider of the repo for the codebase being instrumented.
GetRepositoryURL returns the URL of the repo of the codebase being instrumented.
GetService returns the service of the build of the codebase being instrumented.
GetSpanID returns (_, false) if the context did not contain the current span id.
GetStartTime returns default current time if the context did not contain any start time.
GetTraceID returns (_, false) if the context did not contain any trace id.
GetTrackCallerName returns default information if the context did not contain any build information.
GetTrackConcurrentCalls returns whether autometrics should track how many concurrent calls the instrumented function observe.
GetValidHttpCodeRanges returns the list of values that should be considered as "ok" by Autometrics when computing the success rate of a handler.
GetVersion returns the version of the codebase being instrumented.
NewContext is a constructor taking the parent context as argument.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReflectFunctionModuleName takes any function and returns it's name and module split.
SetAlertConfiguration sets the context's [AlertConfiguration] AlertConfiguration is an optional configuration to add alerting capabilities to the metrics.
SetBranch sets the branch of the build of the codebase being instrumented.
SetBuildInfo sets the context's [BuildInfo] BuildInfo contains all the relevant data for caller information.
SetCallInfo sets the context's [CallInfo] CallInfo contains all the relevant data for caller information.
SetCommit sets the commit of the codebase being instrumented.
SetLogger sets the logging interface for Autometrics.
SetParentSpanID sets the context's span's parent [SpanID].
SetPushJobName sets the job name to use when the codebase being instrumented is pushing metrics to an OTEL Collector.
SetPushJobURL sets the job url to use when the codebase being instrumented is pushing metrics to an OTEL Collector.
SetRepositoryProvider sets the service provider of the repo for the codebase being instrumented.
SetRepositoryURL sets the URL of the repo of the codebase being instrumented.
SetService sets the service name of the build of the codebase being instrumented.
SetSpanID sets the context's [SpanID].
SetStartTime sets the context's [StartTime] StartTime is the start time of a single function execution.
SetTraceID sets the context's [TraceID].
SetTrackCallerName sets a flag in the context deciding whether to track the names of the callers of instrumented functions.
SetTrackConcurrentCalls sets a flag in the context deciding whether to track how many concurrent calls the instrumented functions observe.
SetValidHttpCodeRanges sets the values of http codes that Autometrics should consider as "ok" results on calls.
SetVersion sets the version of the codebase being instrumented.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithNewTraceId returns a copy of the passed context, with a newly generated traceID accessible for autometrics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
AutometricsRepoProviderEnv is the name of the environment variable to declare to give the name of the repository provider to use as a label.
AutometricsRepoURLEnv is the name of the environment variable to declare to give the URL of the repository for the service to use as a label.
AutometricsServiceNameEnv is the name of the environment variable to declare to fetch the name of the service to use as a label.
MiddlewareSpanIDKey is the key to use to index context in middlewares that do not use context.Context.
MiddlewareTraceIDKey is the key to use to index context in middlewares that do not use context.Context.
No description provided by the author
OTelPushPeriodEnv is the name of the environment variable to declare to change the interval between 2 metrics pushes in milliseconds.
OTelPushTimeoutEnv is the name of the environment variable to declare to change the timeout threshold of a single metrics push in milliseconds.
OTelServiceNameEnv is the name of the environment variable to declare to fetch the name of the service to use as a label.
No description provided by the author

# Variables

Those are variables because we cannot have const of this type.
Those are variables because we cannot have const of this type.

# Structs

AlertConfiguration is the configuration for autometric alerting.
BuildInfo holds the information about the current build of the instrumented code.
CallInfo holds the information about the current function call and its parent names.
FunctionID is a unique identifier for a function (on a per-codebase basis).
No description provided by the author
LatencySlo is an objective for latency.
SuccessSlo is an objective for the success rate of the function.

# Interfaces

No description provided by the author

# Type aliases

Implementation is an enumeration type for the possible implementations of metrics to use.
Open Telemetry-compatible span ID.
Open Telemetry-compatible trace ID.