apmprocessor

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

APM Processor

This processor inspects traces and enhances them with attributes that wil light up the New Relic APM UI.

It is best used together with the apm connector.

It can be used on its own as such:

receivers:
  otlp:
    protocols:
      grpc:

processors:
  newrelicapm:
  batch:

exporters:
  otlp:
    endpoint: <endpoint>

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [newrelicapm, batch]
      exporters: [otlp]

Documentation

Index

Constants

View Source
const (
	Type             = "newrelicapm"
	TracesStability  = component.StabilityLevelDevelopment
	MetricsStability = component.StabilityLevelDevelopment
	LogsStability    = component.StabilityLevelDevelopment
)

FIXME copying this from the metadata/generated_status to be able to build the component externally

View Source
const (
	DbSQLTableAttributeName  = "db.sql.table"
	DbSystemAttributeName    = "db.system"
	DbOperationAttributeName = "db.operation"
	DbStatementAttributeName = "db.statement"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

NewFactory returns a new factory for the Attributes processor.

Types

type Config

type Config struct {
	// If set to true, will set the `instrumentation.provider` attribute to `newrelic-opentelemetry`.
	// Defaults to true.
	ChangeInstrumentationProvider bool `mapstructure:"change_instrumentation_provider"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the processor configuration is valid

type SQLParser

type SQLParser struct {
	// contains filtered or unexported fields
}

func NewSQLParser

func NewSQLParser() *SQLParser

func (*SQLParser) ParseDbTableFromSQL

func (sqlParser *SQLParser) ParseDbTableFromSQL(sql string) (string, bool)

func (*SQLParser) ParseDbTableFromSpan

func (sqlParser *SQLParser) ParseDbTableFromSpan(span ptrace.Span) (string, bool)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL