attributes.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package newrelic
  2. // This file contains the names of the automatically captured attributes.
  3. // Attributes are key value pairs attached to transaction events, error events,
  4. // and traced errors. You may add your own attributes using the
  5. // Transaction.AddAttribute method (see transaction.go).
  6. //
  7. // These attribute names are exposed here to facilitate configuration.
  8. //
  9. // For more information, see:
  10. // https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-metrics/agent-attributes
  11. // Attributes destined for Transaction Events and Errors:
  12. const (
  13. // AttributeResponseCode is the response status code for a web request.
  14. AttributeResponseCode = "httpResponseCode"
  15. // AttributeRequestMethod is the request's method.
  16. AttributeRequestMethod = "request.method"
  17. // AttributeRequestAccept is the request's "Accept" header.
  18. AttributeRequestAccept = "request.headers.accept"
  19. // AttributeRequestContentType is the request's "Content-Type" header.
  20. AttributeRequestContentType = "request.headers.contentType"
  21. // AttributeRequestContentLength is the request's "Content-Length" header.
  22. AttributeRequestContentLength = "request.headers.contentLength"
  23. // AttributeRequestHost is the request's "Host" header.
  24. AttributeRequestHost = "request.headers.host"
  25. // AttributeResponseContentType is the response "Content-Type" header.
  26. AttributeResponseContentType = "response.headers.contentType"
  27. // AttributeResponseContentLength is the response "Content-Length" header.
  28. AttributeResponseContentLength = "response.headers.contentLength"
  29. // AttributeHostDisplayName contains the value of Config.HostDisplayName.
  30. AttributeHostDisplayName = "host.displayName"
  31. )
  32. // Attributes destined for Errors:
  33. const (
  34. // AttributeRequestUserAgent is the request's "User-Agent" header.
  35. AttributeRequestUserAgent = "request.headers.User-Agent"
  36. // AttributeRequestReferer is the request's "Referer" header. Query
  37. // string parameters are removed.
  38. AttributeRequestReferer = "request.headers.referer"
  39. )