Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallNewPipeline ¶
InstallNewPipeline instantiates a NewExportPipeline with the recommended configuration and registers it globally.
func NewExportPipeline ¶
NewExportPipeline sets up a complete export pipeline with the recommended setup for trace provider
Types ¶
type Data ¶
type Data struct { BaseType string `json:"baseType"` BaseData interface{} `json:"baseData"` }
Data represesent span data in transmittion
type Envelope ¶
type Envelope struct { Ver int `json:"ver"` Name string `json:"name"` Time string `json:"time"` SampleRate float64 `json:"sampleRate,omitempty"` Seq string `json:"seq,omitempty"` IKey string `json:"iKey"` Tags map[string]string `json:"tags,omitempty"` Data *Data `json:"data"` }
Envelope represents system variables for a telemetry item.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter is an implementation of an OTel SpanSyncer that uploads spans to Azure Monitor
func NewExporter ¶
NewExporter returns an OTel Exporter implementation that exports the collected spans to Azure Monitor.
func (*Exporter) ExportSpans ¶
ExportSpans exports span data to Azure Monitor
type Option ¶
type Option func(*Exporter)
Option is type definion for WithXxx functions
func WithConnectionString ¶
WithConnectionString sets the connection string for exporter
func WithConnectionStringFromEnv ¶
func WithConnectionStringFromEnv() Option
WithConnectionStringFromEnv sets the connection from environment variable
func WithEndpoint ¶
WithEndpoint sets the ingestion endpoint for the exporter
func WithInstrumentationKey ¶
WithInstrumentationKey set the instrumentation key for ingestion endpoint
func WithInstrumentationKeyFromEnv ¶
func WithInstrumentationKeyFromEnv() Option
WithInstrumentationKeyFromEnv sets the instrumentation key from environment variable
func WithProcess ¶
WithProcess sets the process with the information about the exporting process.
type Process ¶
Process contains the information exported to Azure Monitor about the source of the trace data.
type RemoteDependencyData ¶
type RemoteDependencyData struct { Ver int `json:"ver"` Name string `json:"name"` ID string `json:"id"` ResultCode string `json:"resultCode"` Duration string `json:"duration"` Success bool `json:"success"` Data string `json:"data"` Target string `json:"target"` Type string `json:"type"` Properties *map[string]string `json:"properties"` Measurements *map[string]float64 `json:"measurements"` }
RemoteDependencyData represents internal/client span
type RequestData ¶
type RequestData struct { Ver int `json:"ver"` ID string `json:"id"` Source string `json:"source"` Name string `json:"name"` Duration string `json:"duration"` ResponseCode string `json:"responseCode"` Success bool `json:"success"` URL string `json:"url"` Properties *map[string]string `json:"properties,omitempty"` Measurements *map[string]float64 `json:"measurements,omitempty"` }
RequestData represents consumer/server span