go-agent: github.com/newrelic/go-agent/_integrations/logcontext Index | Files | Directories

package logcontext

import "github.com/newrelic/go-agent/_integrations/logcontext"

Index

Package Files

logcontext.go

Constants

const (
    KeyFile       = "file.name"
    KeyLevel      = "log.level"
    KeyLine       = "line.number"
    KeyMessage    = "message"
    KeyMethod     = "method.name"
    KeyTimestamp  = "timestamp"
    KeyTraceID    = "trace.id"
    KeySpanID     = "span.id"
    KeyEntityName = "entity.name"
    KeyEntityType = "entity.type"
    KeyEntityGUID = "entity.guid"
    KeyHostname   = "hostname"
)

Keys used for logging context JSON.

func AddLinkingMetadata Uses

func AddLinkingMetadata(m map[string]interface{}, md newrelic.LinkingMetadata)

AddLinkingMetadata adds the LinkingMetadata into a map. Only non-empty string fields are included in the map. The specific key names facilitate agent logs in context. These keys are: "trace.id", "span.id", "entity.name", "entity.type", "entity.guid", and "hostname".

Directories

PathSynopsis
nrlogruspluginPackage nrlogrusplugin decorates logs for sending to the New Relic backend.
nrlogrusplugin/example

Package logcontext imports 1 packages (graph) and is imported by 1 packages. Updated 2019-11-26. Refresh now. Tools for package owners.