Documentation ¶
Index ¶
- Constants
- func BuildTransactions(td ptrace.Traces) plog.Logs
- func ConvertTraces(logger *zap.Logger, config *Config, td ptrace.Traces) pmetric.Metrics
- func DurationInNanos(span ptrace.Span) int64
- func GenerateInstanceMetric(resourceMetrics *ResourceMetrics, hostName string, timestamp pcommon.Timestamp)
- func GetSdkLanguage(attributes pcommon.Map) string
- func NanosToSeconds(nanos int64) float64
- func NewFactory() connector.Factory
- func NewSimpleNameProvider(name string) func(TransactionType) string
- type Apdex
- type ApmLogConnector
- type ApmMetricConnector
- type AttributeFilter
- type Config
- type Measurement
- type MeterProvider
- type ResourceMetrics
- func (resourceMetrics *ResourceMetrics) GetOrCreateHistogramMetric(metricName string) pmetric.Histogram
- func (resourceMetrics *ResourceMetrics) GetOrCreateMetric(metricName string, init func(pmetric.Metric)) pmetric.Metric
- func (resourceMetrics *ResourceMetrics) GetOrCreateSumMetric(metricName string) pmetric.Sum
- func (resourceMetrics *ResourceMetrics) IncrementSum(metricName string, attributes pcommon.Map, timestamp pcommon.Timestamp) pmetric.NumberDataPoint
- func (resourceMetrics ResourceMetrics) RecordHistogram(metricName string, attributes pcommon.Map, ...) pmetric.HistogramDataPoint
- func (resourceMetrics ResourceMetrics) RecordHistogramFromSpan(metricName string, attributes pcommon.Map, span ptrace.Span) pmetric.HistogramDataPoint
- type SQLParser
- type Transaction
- func (transaction *Transaction) AddMeasurement(measurement *Measurement)
- func (transaction *Transaction) AddSpan(span ptrace.Span)
- func (transaction *Transaction) GenerateApdexMetrics(span ptrace.Span, err bool, transactionName string, ...)
- func (transaction *Transaction) IncrementErrorCount(transactionName string, transactionType TransactionType, ...)
- func (transaction *Transaction) IsRootSet() bool
- func (transaction *Transaction) ProcessClientSpan(span ptrace.Span) bool
- func (transaction *Transaction) ProcessDatabaseSpan(span ptrace.Span) bool
- func (transaction *Transaction) ProcessExternalSpan(span ptrace.Span) bool
- func (transaction *Transaction) ProcessGenericSpan(span ptrace.Span) bool
- func (transaction *Transaction) ProcessMeasurement(measurement *Measurement, transactionType TransactionType, ...)
- func (transaction *Transaction) ProcessRootSpan() bool
- func (transaction *Transaction) SetRootSpan(span ptrace.Span)
- type TransactionType
- type TransactionsMap
Constants ¶
View Source
const ( Type = "newrelicapm" TracesToMetricsStability = component.StabilityLevelDevelopment TracesToLogsStability = component.StabilityLevelDevelopment )
FIXME copying this from the metadata/generated_status to be able to build the component externally
View Source
const ( DbOperationAttributeName = "db.operation" DbSystemAttributeName = "db.system" DbSQLTableAttributeName = "db.sql.table" )
Variables ¶
This section is empty.
Functions ¶
func ConvertTraces ¶
func DurationInNanos ¶
func GenerateInstanceMetric ¶
func GenerateInstanceMetric(resourceMetrics *ResourceMetrics, hostName string, timestamp pcommon.Timestamp)
Generate the metrc used for the host instances drop down
func GetSdkLanguage ¶
func NanosToSeconds ¶
func NewSimpleNameProvider ¶
func NewSimpleNameProvider(name string) func(TransactionType) string
Types ¶
type Apdex ¶
type Apdex struct {
// contains filtered or unexported fields
}
func (Apdex) GetApdexBucket ¶
type ApmLogConnector ¶
type ApmLogConnector struct {
// contains filtered or unexported fields
}
func (*ApmLogConnector) Capabilities ¶
func (c *ApmLogConnector) Capabilities() consumer.Capabilities
func (*ApmLogConnector) ConsumeTraces ¶
type ApmMetricConnector ¶
type ApmMetricConnector struct {
// contains filtered or unexported fields
}
func (*ApmMetricConnector) Capabilities ¶
func (c *ApmMetricConnector) Capabilities() consumer.Capabilities
func (*ApmMetricConnector) ConsumeTraces ¶
type AttributeFilter ¶
type AttributeFilter struct {
// contains filtered or unexported fields
}
func NewAttributeFilter ¶
func NewAttributeFilter() *AttributeFilter
func (*AttributeFilter) FilterAttributes ¶
type Measurement ¶
type Measurement struct {
SpanID, MetricName, MetricTimesliceName string
DurationNanos, ExclusiveDurationNanos int64
Attributes pcommon.Map
SegmentNameProvider func(TransactionType) string
// FIXME
Span ptrace.Span
}
func (Measurement) ExclusiveTime ¶
func (measurement Measurement) ExclusiveTime(transaction *Transaction) int64
type MeterProvider ¶
func NewMeterProvider ¶
func NewMeterProvider() *MeterProvider
type ResourceMetrics ¶
type ResourceMetrics struct {
// contains filtered or unexported fields
}
func (*ResourceMetrics) GetOrCreateHistogramMetric ¶
func (resourceMetrics *ResourceMetrics) GetOrCreateHistogramMetric(metricName string) pmetric.Histogram
func (*ResourceMetrics) GetOrCreateMetric ¶
func (*ResourceMetrics) GetOrCreateSumMetric ¶
func (resourceMetrics *ResourceMetrics) GetOrCreateSumMetric(metricName string) pmetric.Sum
func (*ResourceMetrics) IncrementSum ¶
func (resourceMetrics *ResourceMetrics) IncrementSum(metricName string, attributes pcommon.Map, timestamp pcommon.Timestamp) pmetric.NumberDataPoint
func (ResourceMetrics) RecordHistogram ¶
func (resourceMetrics ResourceMetrics) RecordHistogram(metricName string, attributes pcommon.Map, startTimestamp, endTimestamp pcommon.Timestamp, durationNanos int64) pmetric.HistogramDataPoint
func (ResourceMetrics) RecordHistogramFromSpan ¶
func (resourceMetrics ResourceMetrics) RecordHistogramFromSpan(metricName string, attributes pcommon.Map, span ptrace.Span) pmetric.HistogramDataPoint
type SQLParser ¶
type SQLParser struct { }
func NewSQLParser ¶
func NewSQLParser() *SQLParser
func (*SQLParser) ParseDbTableFromSQL ¶
type Transaction ¶
type Transaction struct { SdkLanguage string SpanToChildDuration map[string]int64 Measurements map[string]*Measurement RootSpan ptrace.Span // contains filtered or unexported fields }
func (*Transaction) AddMeasurement ¶
func (transaction *Transaction) AddMeasurement(measurement *Measurement)
func (*Transaction) AddSpan ¶
func (transaction *Transaction) AddSpan(span ptrace.Span)
func (*Transaction) GenerateApdexMetrics ¶
func (transaction *Transaction) GenerateApdexMetrics(span ptrace.Span, err bool, transactionName string, transactionType TransactionType)
func (*Transaction) IncrementErrorCount ¶
func (transaction *Transaction) IncrementErrorCount(transactionName string, transactionType TransactionType, timestamp pcommon.Timestamp)
func (*Transaction) IsRootSet ¶
func (transaction *Transaction) IsRootSet() bool
func (*Transaction) ProcessClientSpan ¶
func (transaction *Transaction) ProcessClientSpan(span ptrace.Span) bool
func (*Transaction) ProcessDatabaseSpan ¶
func (transaction *Transaction) ProcessDatabaseSpan(span ptrace.Span) bool
func (*Transaction) ProcessExternalSpan ¶
func (transaction *Transaction) ProcessExternalSpan(span ptrace.Span) bool
func (*Transaction) ProcessGenericSpan ¶
func (transaction *Transaction) ProcessGenericSpan(span ptrace.Span) bool
func (*Transaction) ProcessMeasurement ¶
func (transaction *Transaction) ProcessMeasurement(measurement *Measurement, transactionType TransactionType, transactionName string)
func (*Transaction) ProcessRootSpan ¶
func (transaction *Transaction) ProcessRootSpan() bool
func (*Transaction) SetRootSpan ¶
func (transaction *Transaction) SetRootSpan(span ptrace.Span)
type TransactionType ¶
type TransactionType string
const ( WebTransactionType TransactionType = "Web" OtherTransactionType TransactionType = "Other" NullTransactionType TransactionType = "Skip" )
func GetTransactionMetricName ¶
func GetTransactionMetricName(span ptrace.Span) (string, TransactionType)
func GetWebTransactionMetricName ¶
func GetWebTransactionMetricName(span ptrace.Span, name, nameType string) (string, TransactionType)
func (TransactionType) AsString ¶
func (t TransactionType) AsString() string
func (TransactionType) GetOverviewMetricName ¶
func (t TransactionType) GetOverviewMetricName() string
type TransactionsMap ¶
type TransactionsMap struct { Transactions map[string]*Transaction // contains filtered or unexported fields }
func NewTransactionsMap ¶
func NewTransactionsMap(apdexT float64) *TransactionsMap
func (*TransactionsMap) GetOrCreateTransaction ¶
func (transactions *TransactionsMap) GetOrCreateTransaction(sdkLanguage string, span ptrace.Span, resourceMetrics *ResourceMetrics) (*Transaction, string)
func (*TransactionsMap) ProcessTransactions ¶
func (transactions *TransactionsMap) ProcessTransactions()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.