package
3.36.0
Repository: https://github.com/newrelic/go-agent.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package cat provides functionality related to the wire format of CAT headers.
No description provided by the author
No description provided by the author
Package integrationsupport exists to expose functionality to integration packages without adding noise to the public API.
Package jsonx extends the encoding/json package to encode JSON incrementally and without requiring reflection.
No description provided by the author
No description provided by the author
Package stacktracetest helps test stack trace behavior.
No description provided by the author
No description provided by the author
Package utilization implements the Utilization spec, available at https://source.datanerd.us/agents/agent-specs/blob/master/Utilization.md.

# Functions

AddAgentSpanAttribute allows instrumentation packages to add span attributes.
CalculateApdexThreshold calculates the apdex threshold.
CompactJSONString removes the whitespace from a JSON string.
ConnectReplyDefaults returns a newly allocated ConnectReply with the proper default settings.
CreateFullTxnName uses collector rules and the appropriate metric prefix to construct the full transaction metric name from the name given by the consumer.
DefaultEventHarvestConfig provides faster event harvest defaults.
DefaultEventHarvestConfigWithDT is an extended version of DefaultEventHarvestConfig, with the addition that it takes into account distributed tracer span event harvest limits.
FloatSecondsToDuration turns a float64 in seconds into a time.Duration.
GetUsageSupportabilityMetrics returns supportability metric names.
HandlerName return name of a function.
HarvestTesting allows integration packages to test instrumentation.
IsDisconnectSecurityPolicyError indicates if the error is disconnect worthy.
NewTraceIDGenerator creates a new trace identifier generator.
ServerlessWrite exists to avoid type assertion in the nrlambda integration package.
TrackUsage helps track which integration packages are used.
UnmarshalConnectReply takes the body of a Connect reply, in the form of bytes, and a PreconnectReply, and converts it into a *ConnectReply.

# Constants

CustomEventHarvestsPerMinute is the number of times per minute custom events are harvested.
DefaultConfigurableEventHarvestMs is the period for custom, error, and transaction events if the connect response's "event_harvest_config.report_period_ms" is missing or invalid.
MaxCustomEvents is the maximum number of Transaction Events that can be captured per 60-second harvest cycle.
MaxErrorEvents is the maximum number of Error Events that can be captured per 60-second harvest cycle.
MaxLogEvents is the maximum number of Log Events that can be captured per 60-second harvest cycle.
MaxPayloadSizeInBytes specifies the maximum payload size in bytes that should be sent to any endpoint.
MaxSpanEvents is the maximum number of Spans Events that can be captured per 60-second harvest cycle.
MaxTxnEvents is the maximum number of Transaction Events that can be captured per 60-second harvest cycle.
TraceIDHexStringLen is the length of the trace ID when represented as a hex string.

# Variables

GinTransactionContextKey is used as the context key in nrgin.Middleware and nrgin.Transaction.
MatchAnyString is a placeholder for matching any string.
MatchAnything is for use when matching attributes.
MatchAnyUnixMilli is a placeholder for matching any unix millisecond timestamp int64.
TransactionContextKey is the key used for newrelic.FromContext and newrelic.NewContext.

# Structs

ConnectReply contains all of the settings and state send down from the collector.
EventHarvestConfig contains fields relating to faster event harvest.
MessageMetricKey is the key to use for message segments.
PreconnectReply contains settings from the preconnect endpoint.
RequestEventLimits sets limits for reservior testing.
SecurityPolicies contains the security policies.
SpanEventHarvestConfig contains the Reporting period time and the given harvest limit.
TraceIDGenerator creates identifiers for distributed tracing.
WantError is a traced error expectation.
WantEvent is a transaction or error event expectation.
WantLog is a traced log event expectation.
WantMetric is a metric expectation.
WantSlowQuery is a slowQuery expectation.
WantTraceSegment is a transaction trace segment expectation.
WantTxn provides the expectation parameters to ExpectTxnMetrics.
WantTxnTrace is a transaction trace expectation.

# Interfaces

AddAgentAttributer allows instrumentation to add agent attributes without exposing a Transaction method.
AddAgentSpanAttributer should be implemented by the Transaction.
Expect exposes methods that allow for testing whether the correct data was captured.
HarvestTestinger is implemented by the app.
ServerlessWriter is implemented by newrelic.Application.
Validator is used for testing.

# Type aliases

AgentRunID identifies the current connection with the collector.
DialerFunc is a shorthand that is used in tests for connecting directly to a local gRPC server.
MetricRules is a collection of metric rules.
TrustedAccountSet is used for CAT.