flatbuffersdata

package
v0.0.0-...-51c1140 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SampleAppInfo = newrelic.AppInfo{
		License:           collector.LicenseKey("0123456789abcdefghijklmnopqrstuvwxyz1234"),
		Appname:           "Application",
		AgentLanguage:     "php",
		AgentVersion:      "0.0.1",
		Settings:          map[string]interface{}{"newrelic.analytics_events.capture_attributes": "1", "newrelic.analytics_events.enabled": "1", "newrelic.appname": "one;two;three", "newrelic.attributes.enabled": "1", "newrelic.attributes.exclude": "no value", "newrelic.attributes.include": "no value", "newrelic.browser_monitoring.attributes.enabled": "0", "newrelic.browser_monitoring.attributes.exclude": "no value", "newrelic.browser_monitoring.attributes.include": "no value", "newrelic.browser_monitoring.auto_instrument": "1", "newrelic.browser_monitoring.capture_attributes": "0", "newrelic.browser_monitoring.debug": false, "newrelic.browser_monitoring.loader": "rum", "newrelic.capture_params": "0", "newrelic.cross_application_tracer.enabled": "1", "newrelic.custom_insights_events.enabled": "1", "newrelic.daemon.collector_host": "collector.newrelic.com", "newrelic.daemon.location": "/php/php_agent/releases/linux/daemon/newrelic-daemon", "newrelic.daemon.logfile": "/opt/nr/logs/newrelic-daemon.log", "newrelic.daemon.loglevel": "verbosedebug", "newrelic.daemon.port": "/tmp/.newrelic.sock", "newrelic.daemon.special.integration": "1", "newrelic.enabled": "1", "newrelic.error_collector.attributes.enabled": "1", "newrelic.error_collector.attributes.exclude": "no value", "newrelic.error_collector.attributes.include": "no value", "newrelic.error_collector.capture_attributes": "1", "newrelic.error_collector.enabled": "1", "newrelic.error_collector.prioritize_api_errors": "0", "newrelic.error_collector.record_database_errors": "1", "newrelic.feature_flag": "no value", "newrelic.framework": "no value", "newrelic.framework.drupal.modules": "1", "newrelic.high_security": "0", "newrelic.ignored_params": "no value", "newrelic.labels": "no value", "newrelic.license": "123456789", "newrelic.logfile": "/opt/nr/logs/php_agent.log", "newrelic.loglevel": "verbosedebug", "newrelic.special.expensive_node_min": "0", "newrelic.special.max_nesting_level": "-1", "newrelic.synthetics.enabled": "1", "newrelic.transaction_events.attributes.enabled": "1", "newrelic.transaction_events.attributes.exclude": "no value", "newrelic.transaction_events.attributes.include": "no value", "newrelic.transaction_events.enabled": "1", "newrelic.transaction_tracer.attributes.enabled": "1", "newrelic.transaction_tracer.attributes.exclude": "no value", "newrelic.transaction_tracer.attributes.include": "no value", "newrelic.transaction_tracer.capture_attributes": "1", "newrelic.transaction_tracer.custom": "no value", "newrelic.transaction_tracer.detail": "1", "newrelic.transaction_tracer.enabled": "1", "newrelic.transaction_tracer.explain_enabled": "1", "newrelic.transaction_tracer.explain_threshold": "1", "newrelic.transaction_tracer.record_sql": "obfuscated", "newrelic.transaction_tracer.slow_sql": "1", "newrelic.transaction_tracer.stack_trace_threshold": "1", "newrelic.transaction_tracer.threshold": "1", "newrelic.webtransaction.name.files": "no value", "newrelic.webtransaction.name.functions": "no value", "newrelic.webtransaction.name.remove_trailing_path": "0"},
		Environment:       newrelic.JSONString(`[]`),
		HighSecurity:      false,
		Labels:            newrelic.JSONString(`[]`),
		RedirectCollector: "collector.newrelic.com",
		Hostname:          "agent-hostname",
		TraceObserverHost: "",
		TraceObserverPort: 0,
	}
	SampleTxn = Txn{
		Name:             "WebTransaction/Action/heyo",
		SamplingPriority: 0.80000,
		Metrics:          SampleMetrics,
		Errors:           []*newrelic.Error{SampleError},
		Trace:            SampleTrace,
		SlowSQLs:         SampleSlowSQLs,
		AnalyticEvent:    SampleAnalyticEvent,
		CustomEvents:     SampleCustomEvents,
		ErrorEvents:      SampleErrorEvents,
		SpanEvents:       SampleSpanEvents,
	}
	SampleAnalyticEvent = json.RawMessage(`[{"type":"Transaction","name":"OtherTransaction\/php\/php\/fake\/heyo.php","timestamp":1421910689.96993,"duration":2.06631},{"zip":"zap"},{}]`)
	SampleCustomEvents  = []json.RawMessage{
		json.RawMessage(`[{"x":1}]`),
		json.RawMessage(`[{"x":2}]`),
		json.RawMessage(`[{"x":3}]`),
	}
	SampleErrorEvents = []json.RawMessage{
		json.RawMessage(`[{"type": "TransactionError",` +
			`"timestamp": 1445290225.1948,"error.class": "HeyoException",` +
			`"error.message": "Uncaught exception 'HeyoException' with message 'foo!' in /Users/earnold/workspace/php_integration_tests/integration/errors/heyo.php:6",` +
			`"transactionName": "OtherTransaction/php/heyo.php","duration": 0.00101,"nr.transactionGuid": "390b8adab3b435c2"}]`),
	}
	SampleSpanEvents = []json.RawMessage{
		json.RawMessage(`[{"Span1":1}]`),
		json.RawMessage(`[{"Span2":2}]`),
		json.RawMessage(`[{"Span3":3}]`),
	}
	SampleError = &newrelic.Error{
		Priority: 100,
		Data:     newrelic.JSONString(`[1378167,"mytxn","myMessage","myClass",{"stack_trace":["zip","zap"]}]`),
	}
	SampleTrace = &newrelic.TxnTrace{
		MetricName:           "WebTransaction/Action/heyo",
		RequestURI:           "alpha/beta/gamma",
		UnixTimestampMillis:  123456.123456,
		DurationMillis:       2001,
		Data:                 newrelic.JSONString("[[0,{},{},[0,2001,\"ROOT\",{},[[0,2001,\"`0\",{},[[0,2001,\"`1\",{},[]]]]]],{\"agentAttributes\":{\"SERVER_NAME\":\"\"},\"intrinsics\":{\"cpu_time\":0.00200,\"cpu_user_time\":0.00200,\"cpu_sys_time\":0.00000}}],[\"OtherTransaction\\/php\\/php\\/fake\\/heyo.php\",\"Custom\\/alpha\"]]"),
		GUID:                 "abcdef0123456789",
		ForcePersist:         false,
		SyntheticsResourceID: "1234",
	}
	SampleSlowSQLs = []*newrelic.SlowSQL{
		&newrelic.SlowSQL{
			MetricName:  "Database/my_table/insert",
			ID:          newrelic.SQLId(1),
			Count:       20,
			TotalMicros: 1000,
			MinMicros:   25,
			MaxMicros:   75,
			Params:      newrelic.JSONString(`{"backtrace":["zip", "zap"]}`),
			Query:       "select * from heyo",
			TxnName:     "WebTransaction/Action/zap",
			TxnURL:      "zip/zap/zop",
		},
		&newrelic.SlowSQL{
			MetricName:  "Database/big_table/delete",
			ID:          newrelic.SQLId(2),
			Count:       10,
			TotalMicros: 2000,
			MinMicros:   150,
			MaxMicros:   250,
			Params:      newrelic.JSONString(`{"backtrace":["bink", "bonk"]}`),
			Query:       "select * from alpha",
			TxnName:     "WebTransaction/Action/bink",
			TxnURL:      "alpha/beta/gamma",
		},
		&newrelic.SlowSQL{
			MetricName:  "Database/other_table/insert",
			ID:          newrelic.SQLId(3),
			Count:       1,
			TotalMicros: 15,
			MinMicros:   15,
			MaxMicros:   15,
			Params:      newrelic.JSONString(`{"backtrace":["green", "yellow"]}`),
			Query:       "insert ? into other_table",
			TxnName:     "WebTransaction/Action/other",
			TxnURL:      "green/yellow/other",
		},
	}
	SampleMetrics = []metric{}/* 2336 elements not displayed */

)

Functions

func MarshalAppInfo

func MarshalAppInfo(info *newrelic.AppInfo) ([]byte, error)

Types

type Txn

type Txn struct {
	RunID            string
	Name             string
	SamplingPriority newrelic.SamplingPriority
	Metrics          []metric
	Errors           []*newrelic.Error
	Trace            *newrelic.TxnTrace
	SlowSQLs         []*newrelic.SlowSQL
	AnalyticEvent    json.RawMessage
	CustomEvents     []json.RawMessage
	ErrorEvents      []json.RawMessage
	SpanEvents       []json.RawMessage
}

func (*Txn) MarshalBinary

func (t *Txn) MarshalBinary() ([]byte, error)

func (*Txn) MarshalSpanBatchBinary

func (t *Txn) MarshalSpanBatchBinary(batchSize int, protoSpanBatch []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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