Documentation ¶
Overview ¶
* Unless explicitly stated otherwise all files in this repository are licensed * under the Apache License Version 2.0. * * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2021 Datadog, Inc.
* Unless explicitly stated otherwise all files in this repository are licensed * under the Apache License Version 2.0. * * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2021 Datadog, Inc.
* Unless explicitly stated otherwise all files in this repository are licensed * under the Apache License Version 2.0. * * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2021 Datadog, Inc.
Index ¶
- func AddTagsToTracePayloads(tracePayloads []*pb.TracePayload, tags string)
- func ComputeAPMStats(tracePayload *pb.TracePayload) *stats.Payload
- func GetAnalyzedSpans(sps []*pb.Span) []*pb.Span
- func IsParentedToXray(span *pb.Span) bool
- func NewClient(InsecureSkipVerify bool) *http.Client
- func ObfuscatePayload(obfuscator *obfuscate.Obfuscator, tracePayloads []*pb.TracePayload)
- func ParseTrace(content string) ([]*pb.TracePayload, error)
- func ProcessTrace(content string, obfuscator *obfuscate.Obfuscator, tags string) ([]*pb.TracePayload, error)
- func SetExtraHeaders(h http.Header, extras map[string]string)
- type Payload
- type TraceEdgeConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTagsToTracePayloads ¶
func AddTagsToTracePayloads(tracePayloads []*pb.TracePayload, tags string)
AddTagsToTracePayloads takes a single string of tags, eg 'a:b,c:d', and applies them to each span in a trace
func ComputeAPMStats ¶
func ComputeAPMStats(tracePayload *pb.TracePayload) *stats.Payload
ComputeAPMStats calculates the stats that should be submitted to APM about a given trace
func GetAnalyzedSpans ¶
GetAnalyzedSpans finds all the analyzed spans in a trace, including top level spans and spans marked as anaylzed by the tracer. A span is considered top-level if:
- it's a root span
- its parent is unknown (other part of the code, distributed trace)
- its parent belongs to another service (in that case it's a "local root" being the highest ancestor of other spans belonging to this service and attached to it).
func IsParentedToXray ¶
IsParentedToXray detects whether the parent of a trace is an X-Ray span
func ObfuscatePayload ¶
func ObfuscatePayload(obfuscator *obfuscate.Obfuscator, tracePayloads []*pb.TracePayload)
ObfuscatePayload applies obfuscator rules to the trace payloads
func ParseTrace ¶
func ParseTrace(content string) ([]*pb.TracePayload, error)
ParseTrace reads a trace using the standard log format
func ProcessTrace ¶
func ProcessTrace(content string, obfuscator *obfuscate.Obfuscator, tags string) ([]*pb.TracePayload, error)
ProcessTrace parses, applies tags, and obfuscates a trace
Types ¶
type TraceEdgeConnection ¶
type TraceEdgeConnection interface { SendTraces(ctx context.Context, trace *pb.TracePayload, maxRetries int) error SendStats(ctx context.Context, stats *stats.Payload, maxRetries int) error }
TraceEdgeConnection is used to send data to trace edge
func CreateTraceEdgeConnection ¶
func CreateTraceEdgeConnection(rootURL, apiKey string, InsecureSkipVerify bool) TraceEdgeConnection
CreateTraceEdgeConnection returns a new TraceEdgeConnection