appsignal 5.0.0.rc.1-java → 5.0.0.rc.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +140 -0
- data/README.md +2 -1
- data/Rakefile +110 -6
- data/appsignal.gemspec +7 -0
- data/build_matrix.yml +7 -2
- data/ext/agent.rb +27 -27
- data/lib/appsignal/cli/demo.rb +5 -0
- data/lib/appsignal/cli/diagnose.rb +8 -48
- data/lib/appsignal/cli/helpers.rb +45 -0
- data/lib/appsignal/config.rb +262 -37
- data/lib/appsignal/demo.rb +11 -9
- data/lib/appsignal/helpers/instrumentation.rb +88 -0
- data/lib/appsignal/hooks/action_cable.rb +8 -2
- data/lib/appsignal/hooks/active_job.rb +189 -1
- data/lib/appsignal/integrations/delayed_job_plugin.rb +172 -32
- data/lib/appsignal/integrations/que.rb +41 -9
- data/lib/appsignal/integrations/railtie.rb +4 -2
- data/lib/appsignal/integrations/resque.rb +26 -3
- data/lib/appsignal/integrations/shoryuken.rb +21 -2
- data/lib/appsignal/integrations/sidekiq.rb +23 -2
- data/lib/appsignal/integrations/webmachine.rb +13 -5
- data/lib/appsignal/opentelemetry/http_server_request.rb +35 -1
- data/lib/appsignal/opentelemetry/proxied_exporter.rb +83 -0
- data/lib/appsignal/opentelemetry.rb +182 -24
- data/lib/appsignal/rack/abstract_middleware.rb +4 -1
- data/lib/appsignal/rack/event_handler.rb +9 -2
- data/lib/appsignal/rack/grape_middleware.rb +37 -7
- data/lib/appsignal/rack.rb +29 -1
- data/lib/appsignal/transaction/base_backend.rb +21 -0
- data/lib/appsignal/transaction/extension_backend.rb +26 -0
- data/lib/appsignal/transaction/opentelemetry_backend.rb +90 -39
- data/lib/appsignal/transaction.rb +189 -32
- data/lib/appsignal/utils/request_headers.rb +78 -0
- data/lib/appsignal/utils.rb +1 -0
- data/lib/appsignal/version.rb +1 -1
- data/lib/appsignal.rb +1 -0
- data/sig/appsignal.rbi +205 -1
- data/sig/appsignal.rbs +196 -0
- metadata +3 -1
data/sig/appsignal.rbi
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
module Appsignal
|
|
9
9
|
extend Appsignal::Helpers::Metrics
|
|
10
10
|
extend Appsignal::Helpers::Instrumentation
|
|
11
|
-
VERSION = T.let("5.0.0.rc.
|
|
11
|
+
VERSION = T.let("5.0.0.rc.2", T.untyped)
|
|
12
12
|
|
|
13
13
|
class << self
|
|
14
14
|
# The loaded AppSignal configuration.
|
|
@@ -941,12 +941,89 @@ module Appsignal
|
|
|
941
941
|
# # { "PATH_INFO" => "/some-path", "HTTP_USER_AGENT" => "Firefox" }
|
|
942
942
|
# ```
|
|
943
943
|
#
|
|
944
|
+
# _@deprecated_ — Use {#add_request_headers} for request headers and
|
|
945
|
+
# {#add_request_environment} for the values a Rack environment holds
|
|
946
|
+
# that are not request headers. This method takes both kinds at once,
|
|
947
|
+
# so it has to work out which of them each value is.
|
|
948
|
+
#
|
|
949
|
+
# _@see_ `#add_request_headers`
|
|
950
|
+
#
|
|
951
|
+
# _@see_ `#add_request_environment`
|
|
952
|
+
#
|
|
944
953
|
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
945
954
|
#
|
|
946
955
|
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
947
956
|
sig { params(headers: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
948
957
|
def self.add_headers(headers = nil, &block); end
|
|
949
958
|
|
|
959
|
+
# Add request headers to the current transaction.
|
|
960
|
+
#
|
|
961
|
+
# Request headers are automatically added by most of our integrations. It
|
|
962
|
+
# should not be necessary to call this method unless you want to also
|
|
963
|
+
# report different request headers.
|
|
964
|
+
#
|
|
965
|
+
# Name each header the way OpenTelemetry names it, in lowercase and with
|
|
966
|
+
# dashes. In agent mode the names are converted to the Rack spellings the
|
|
967
|
+
# environment uses, so `accept` is reported as `HTTP_ACCEPT`.
|
|
968
|
+
#
|
|
969
|
+
# To filter request headers, see our request header filtering guide.
|
|
970
|
+
#
|
|
971
|
+
# When both the `headers` argument and a block is given to this method,
|
|
972
|
+
# the block is leading and the argument will _not_ be used.
|
|
973
|
+
#
|
|
974
|
+
# _@param_ `headers` — The request headers to add to the transaction.
|
|
975
|
+
#
|
|
976
|
+
# Add request headers
|
|
977
|
+
# ```ruby
|
|
978
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
979
|
+
# # The request headers will include:
|
|
980
|
+
# # { "accept" => "text/html" }
|
|
981
|
+
# ```
|
|
982
|
+
#
|
|
983
|
+
# Calling `add_request_headers` multiple times merges the values
|
|
984
|
+
# ```ruby
|
|
985
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
986
|
+
# Appsignal.add_request_headers("user-agent" => "Firefox")
|
|
987
|
+
# # The request headers will include:
|
|
988
|
+
# # { "accept" => "text/html", "user-agent" => "Firefox" }
|
|
989
|
+
# ```
|
|
990
|
+
#
|
|
991
|
+
# _@see_ `#add_request_environment`
|
|
992
|
+
#
|
|
993
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
994
|
+
#
|
|
995
|
+
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
996
|
+
sig { params(headers: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
997
|
+
def self.add_request_headers(headers = nil, &block); end
|
|
998
|
+
|
|
999
|
+
# Add values from the request environment to the current transaction.
|
|
1000
|
+
#
|
|
1001
|
+
# These are the values a Rack environment holds that are not request
|
|
1002
|
+
# headers, such as `REMOTE_ADDR` and `QUERY_STRING`. Name each one the
|
|
1003
|
+
# way Rack names it. Use {#add_request_headers} for the request headers.
|
|
1004
|
+
#
|
|
1005
|
+
# The request environment is automatically added by most of our
|
|
1006
|
+
# integrations. It should not be necessary to call this method unless you
|
|
1007
|
+
# want to also report different values.
|
|
1008
|
+
#
|
|
1009
|
+
# When both the `environment` argument and a block is given to this
|
|
1010
|
+
# method, the block is leading and the argument will _not_ be used.
|
|
1011
|
+
#
|
|
1012
|
+
# _@param_ `environment` — The request environment values to add to the transaction.
|
|
1013
|
+
#
|
|
1014
|
+
# Add request environment values
|
|
1015
|
+
# ```ruby
|
|
1016
|
+
# Appsignal.add_request_environment("REMOTE_ADDR" => "127.0.0.1")
|
|
1017
|
+
# # The request environment will include:
|
|
1018
|
+
# # { "REMOTE_ADDR" => "127.0.0.1" }
|
|
1019
|
+
# ```
|
|
1020
|
+
#
|
|
1021
|
+
# _@see_ `#add_request_headers`
|
|
1022
|
+
#
|
|
1023
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
1024
|
+
sig { params(environment: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
1025
|
+
def self.add_request_environment(environment = nil, &block); end
|
|
1026
|
+
|
|
950
1027
|
# Add breadcrumbs to the transaction.
|
|
951
1028
|
#
|
|
952
1029
|
# Breadcrumbs can be used to trace what path a user has taken
|
|
@@ -1493,6 +1570,16 @@ module Appsignal
|
|
|
1493
1570
|
sig { returns(T::Array[String]) }
|
|
1494
1571
|
attr_accessor :ignore_namespaces
|
|
1495
1572
|
|
|
1573
|
+
# _@return_ — Rack environment keys to report in collector
|
|
1574
|
+
# mode, named the way Rack names them
|
|
1575
|
+
sig { returns(T::Array[String]) }
|
|
1576
|
+
attr_accessor :keep_request_environment
|
|
1577
|
+
|
|
1578
|
+
# _@return_ — HTTP request headers to report in collector
|
|
1579
|
+
# mode, named the way OpenTelemetry names them
|
|
1580
|
+
sig { returns(T::Array[String]) }
|
|
1581
|
+
attr_accessor :keep_request_headers
|
|
1582
|
+
|
|
1496
1583
|
# _@return_ — HTTP request headers to include in error reports
|
|
1497
1584
|
sig { returns(T::Array[String]) }
|
|
1498
1585
|
attr_accessor :request_headers
|
|
@@ -1955,12 +2042,52 @@ module Appsignal
|
|
|
1955
2042
|
#
|
|
1956
2043
|
# _@param_ `given_headers` — A hash containing headers.
|
|
1957
2044
|
#
|
|
2045
|
+
# _@deprecated_ — Use {#add_request_headers} for request headers and
|
|
2046
|
+
# {#add_request_environment} for the values a Rack environment holds that
|
|
2047
|
+
# are not request headers. This method takes both kinds at once, so it
|
|
2048
|
+
# has to work out which of them each value is.
|
|
2049
|
+
#
|
|
1958
2050
|
# _@see_ `Helpers::Instrumentation#add_headers`
|
|
1959
2051
|
#
|
|
1960
2052
|
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
1961
2053
|
sig { params(given_headers: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
1962
2054
|
def add_headers(given_headers = nil, &block); end
|
|
1963
2055
|
|
|
2056
|
+
# Add request headers to the transaction.
|
|
2057
|
+
#
|
|
2058
|
+
# Name each header the way OpenTelemetry names it, in lowercase and with
|
|
2059
|
+
# dashes, such as `accept` and `content-length`. In agent mode the names
|
|
2060
|
+
# are converted to the Rack spellings the environment uses, such as
|
|
2061
|
+
# `HTTP_ACCEPT`.
|
|
2062
|
+
#
|
|
2063
|
+
# Behaves like {#add_headers}: merges when called multiple times, and a
|
|
2064
|
+
# block takes precedence over the argument.
|
|
2065
|
+
#
|
|
2066
|
+
# _@param_ `given_headers` — A hash containing request headers.
|
|
2067
|
+
#
|
|
2068
|
+
# _@see_ `#add_request_environment`
|
|
2069
|
+
#
|
|
2070
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
2071
|
+
sig { params(given_headers: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
2072
|
+
def add_request_headers(given_headers = nil, &block); end
|
|
2073
|
+
|
|
2074
|
+
# Add values from the request environment to the transaction.
|
|
2075
|
+
#
|
|
2076
|
+
# These are the values a Rack environment holds that are not request
|
|
2077
|
+
# headers, such as `REMOTE_ADDR` and `QUERY_STRING`. Name each one the way
|
|
2078
|
+
# Rack names it. Use {#add_request_headers} for the request headers.
|
|
2079
|
+
#
|
|
2080
|
+
# Behaves like {#add_headers}: merges when called multiple times, and a
|
|
2081
|
+
# block takes precedence over the argument.
|
|
2082
|
+
#
|
|
2083
|
+
# _@param_ `given_environment` — A hash containing request environment values.
|
|
2084
|
+
#
|
|
2085
|
+
# _@see_ `#add_request_headers`
|
|
2086
|
+
#
|
|
2087
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
2088
|
+
sig { params(given_environment: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
2089
|
+
def add_request_environment(given_environment = nil, &block); end
|
|
2090
|
+
|
|
1964
2091
|
# Add custom data to the transaction.
|
|
1965
2092
|
#
|
|
1966
2093
|
# _@param_ `data` — Custom data to add to the transaction.
|
|
@@ -2852,12 +2979,89 @@ module Appsignal
|
|
|
2852
2979
|
# # { "PATH_INFO" => "/some-path", "HTTP_USER_AGENT" => "Firefox" }
|
|
2853
2980
|
# ```
|
|
2854
2981
|
#
|
|
2982
|
+
# _@deprecated_ — Use {#add_request_headers} for request headers and
|
|
2983
|
+
# {#add_request_environment} for the values a Rack environment holds
|
|
2984
|
+
# that are not request headers. This method takes both kinds at once,
|
|
2985
|
+
# so it has to work out which of them each value is.
|
|
2986
|
+
#
|
|
2987
|
+
# _@see_ `#add_request_headers`
|
|
2988
|
+
#
|
|
2989
|
+
# _@see_ `#add_request_environment`
|
|
2990
|
+
#
|
|
2855
2991
|
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
2856
2992
|
#
|
|
2857
2993
|
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
2858
2994
|
sig { params(headers: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
2859
2995
|
def add_headers(headers = nil, &block); end
|
|
2860
2996
|
|
|
2997
|
+
# Add request headers to the current transaction.
|
|
2998
|
+
#
|
|
2999
|
+
# Request headers are automatically added by most of our integrations. It
|
|
3000
|
+
# should not be necessary to call this method unless you want to also
|
|
3001
|
+
# report different request headers.
|
|
3002
|
+
#
|
|
3003
|
+
# Name each header the way OpenTelemetry names it, in lowercase and with
|
|
3004
|
+
# dashes. In agent mode the names are converted to the Rack spellings the
|
|
3005
|
+
# environment uses, so `accept` is reported as `HTTP_ACCEPT`.
|
|
3006
|
+
#
|
|
3007
|
+
# To filter request headers, see our request header filtering guide.
|
|
3008
|
+
#
|
|
3009
|
+
# When both the `headers` argument and a block is given to this method,
|
|
3010
|
+
# the block is leading and the argument will _not_ be used.
|
|
3011
|
+
#
|
|
3012
|
+
# _@param_ `headers` — The request headers to add to the transaction.
|
|
3013
|
+
#
|
|
3014
|
+
# Add request headers
|
|
3015
|
+
# ```ruby
|
|
3016
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
3017
|
+
# # The request headers will include:
|
|
3018
|
+
# # { "accept" => "text/html" }
|
|
3019
|
+
# ```
|
|
3020
|
+
#
|
|
3021
|
+
# Calling `add_request_headers` multiple times merges the values
|
|
3022
|
+
# ```ruby
|
|
3023
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
3024
|
+
# Appsignal.add_request_headers("user-agent" => "Firefox")
|
|
3025
|
+
# # The request headers will include:
|
|
3026
|
+
# # { "accept" => "text/html", "user-agent" => "Firefox" }
|
|
3027
|
+
# ```
|
|
3028
|
+
#
|
|
3029
|
+
# _@see_ `#add_request_environment`
|
|
3030
|
+
#
|
|
3031
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
3032
|
+
#
|
|
3033
|
+
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
3034
|
+
sig { params(headers: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
3035
|
+
def add_request_headers(headers = nil, &block); end
|
|
3036
|
+
|
|
3037
|
+
# Add values from the request environment to the current transaction.
|
|
3038
|
+
#
|
|
3039
|
+
# These are the values a Rack environment holds that are not request
|
|
3040
|
+
# headers, such as `REMOTE_ADDR` and `QUERY_STRING`. Name each one the
|
|
3041
|
+
# way Rack names it. Use {#add_request_headers} for the request headers.
|
|
3042
|
+
#
|
|
3043
|
+
# The request environment is automatically added by most of our
|
|
3044
|
+
# integrations. It should not be necessary to call this method unless you
|
|
3045
|
+
# want to also report different values.
|
|
3046
|
+
#
|
|
3047
|
+
# When both the `environment` argument and a block is given to this
|
|
3048
|
+
# method, the block is leading and the argument will _not_ be used.
|
|
3049
|
+
#
|
|
3050
|
+
# _@param_ `environment` — The request environment values to add to the transaction.
|
|
3051
|
+
#
|
|
3052
|
+
# Add request environment values
|
|
3053
|
+
# ```ruby
|
|
3054
|
+
# Appsignal.add_request_environment("REMOTE_ADDR" => "127.0.0.1")
|
|
3055
|
+
# # The request environment will include:
|
|
3056
|
+
# # { "REMOTE_ADDR" => "127.0.0.1" }
|
|
3057
|
+
# ```
|
|
3058
|
+
#
|
|
3059
|
+
# _@see_ `#add_request_headers`
|
|
3060
|
+
#
|
|
3061
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
3062
|
+
sig { params(environment: T.nilable(T::Hash[String, Object]), block: T.proc.returns(T::Hash[String, Object])).void }
|
|
3063
|
+
def add_request_environment(environment = nil, &block); end
|
|
3064
|
+
|
|
2861
3065
|
# Add breadcrumbs to the transaction.
|
|
2862
3066
|
#
|
|
2863
3067
|
# Breadcrumbs can be used to trace what path a user has taken
|
data/sig/appsignal.rbs
CHANGED
|
@@ -872,11 +872,86 @@ module Appsignal
|
|
|
872
872
|
# # { "PATH_INFO" => "/some-path", "HTTP_USER_AGENT" => "Firefox" }
|
|
873
873
|
# ```
|
|
874
874
|
#
|
|
875
|
+
# _@deprecated_ — Use {#add_request_headers} for request headers and
|
|
876
|
+
# {#add_request_environment} for the values a Rack environment holds
|
|
877
|
+
# that are not request headers. This method takes both kinds at once,
|
|
878
|
+
# so it has to work out which of them each value is.
|
|
879
|
+
#
|
|
880
|
+
# _@see_ `#add_request_headers`
|
|
881
|
+
#
|
|
882
|
+
# _@see_ `#add_request_environment`
|
|
883
|
+
#
|
|
875
884
|
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
876
885
|
#
|
|
877
886
|
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
878
887
|
def self.add_headers: (?::Hash[String, Object]? headers) ?{ () -> ::Hash[String, Object] } -> void
|
|
879
888
|
|
|
889
|
+
# Add request headers to the current transaction.
|
|
890
|
+
#
|
|
891
|
+
# Request headers are automatically added by most of our integrations. It
|
|
892
|
+
# should not be necessary to call this method unless you want to also
|
|
893
|
+
# report different request headers.
|
|
894
|
+
#
|
|
895
|
+
# Name each header the way OpenTelemetry names it, in lowercase and with
|
|
896
|
+
# dashes. In agent mode the names are converted to the Rack spellings the
|
|
897
|
+
# environment uses, so `accept` is reported as `HTTP_ACCEPT`.
|
|
898
|
+
#
|
|
899
|
+
# To filter request headers, see our request header filtering guide.
|
|
900
|
+
#
|
|
901
|
+
# When both the `headers` argument and a block is given to this method,
|
|
902
|
+
# the block is leading and the argument will _not_ be used.
|
|
903
|
+
#
|
|
904
|
+
# _@param_ `headers` — The request headers to add to the transaction.
|
|
905
|
+
#
|
|
906
|
+
# Add request headers
|
|
907
|
+
# ```ruby
|
|
908
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
909
|
+
# # The request headers will include:
|
|
910
|
+
# # { "accept" => "text/html" }
|
|
911
|
+
# ```
|
|
912
|
+
#
|
|
913
|
+
# Calling `add_request_headers` multiple times merges the values
|
|
914
|
+
# ```ruby
|
|
915
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
916
|
+
# Appsignal.add_request_headers("user-agent" => "Firefox")
|
|
917
|
+
# # The request headers will include:
|
|
918
|
+
# # { "accept" => "text/html", "user-agent" => "Firefox" }
|
|
919
|
+
# ```
|
|
920
|
+
#
|
|
921
|
+
# _@see_ `#add_request_environment`
|
|
922
|
+
#
|
|
923
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
924
|
+
#
|
|
925
|
+
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
926
|
+
def self.add_request_headers: (?::Hash[String, Object]? headers) ?{ () -> ::Hash[String, Object] } -> void
|
|
927
|
+
|
|
928
|
+
# Add values from the request environment to the current transaction.
|
|
929
|
+
#
|
|
930
|
+
# These are the values a Rack environment holds that are not request
|
|
931
|
+
# headers, such as `REMOTE_ADDR` and `QUERY_STRING`. Name each one the
|
|
932
|
+
# way Rack names it. Use {#add_request_headers} for the request headers.
|
|
933
|
+
#
|
|
934
|
+
# The request environment is automatically added by most of our
|
|
935
|
+
# integrations. It should not be necessary to call this method unless you
|
|
936
|
+
# want to also report different values.
|
|
937
|
+
#
|
|
938
|
+
# When both the `environment` argument and a block is given to this
|
|
939
|
+
# method, the block is leading and the argument will _not_ be used.
|
|
940
|
+
#
|
|
941
|
+
# _@param_ `environment` — The request environment values to add to the transaction.
|
|
942
|
+
#
|
|
943
|
+
# Add request environment values
|
|
944
|
+
# ```ruby
|
|
945
|
+
# Appsignal.add_request_environment("REMOTE_ADDR" => "127.0.0.1")
|
|
946
|
+
# # The request environment will include:
|
|
947
|
+
# # { "REMOTE_ADDR" => "127.0.0.1" }
|
|
948
|
+
# ```
|
|
949
|
+
#
|
|
950
|
+
# _@see_ `#add_request_headers`
|
|
951
|
+
#
|
|
952
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
953
|
+
def self.add_request_environment: (?::Hash[String, Object]? environment) ?{ () -> ::Hash[String, Object] } -> void
|
|
954
|
+
|
|
880
955
|
# Add breadcrumbs to the transaction.
|
|
881
956
|
#
|
|
882
957
|
# Breadcrumbs can be used to trace what path a user has taken
|
|
@@ -1366,6 +1441,14 @@ module Appsignal
|
|
|
1366
1441
|
# _@return_ — Ignore traces by namespaces
|
|
1367
1442
|
attr_accessor ignore_namespaces: ::Array[String]
|
|
1368
1443
|
|
|
1444
|
+
# _@return_ — Rack environment keys to report in collector
|
|
1445
|
+
# mode, named the way Rack names them
|
|
1446
|
+
attr_accessor keep_request_environment: ::Array[String]
|
|
1447
|
+
|
|
1448
|
+
# _@return_ — HTTP request headers to report in collector
|
|
1449
|
+
# mode, named the way OpenTelemetry names them
|
|
1450
|
+
attr_accessor keep_request_headers: ::Array[String]
|
|
1451
|
+
|
|
1369
1452
|
# _@return_ — HTTP request headers to include in error reports
|
|
1370
1453
|
attr_accessor request_headers: ::Array[String]
|
|
1371
1454
|
|
|
@@ -1794,11 +1877,49 @@ module Appsignal
|
|
|
1794
1877
|
#
|
|
1795
1878
|
# _@param_ `given_headers` — A hash containing headers.
|
|
1796
1879
|
#
|
|
1880
|
+
# _@deprecated_ — Use {#add_request_headers} for request headers and
|
|
1881
|
+
# {#add_request_environment} for the values a Rack environment holds that
|
|
1882
|
+
# are not request headers. This method takes both kinds at once, so it
|
|
1883
|
+
# has to work out which of them each value is.
|
|
1884
|
+
#
|
|
1797
1885
|
# _@see_ `Helpers::Instrumentation#add_headers`
|
|
1798
1886
|
#
|
|
1799
1887
|
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
1800
1888
|
def add_headers: (?::Hash[String, Object]? given_headers) ?{ () -> ::Hash[String, Object] } -> void
|
|
1801
1889
|
|
|
1890
|
+
# Add request headers to the transaction.
|
|
1891
|
+
#
|
|
1892
|
+
# Name each header the way OpenTelemetry names it, in lowercase and with
|
|
1893
|
+
# dashes, such as `accept` and `content-length`. In agent mode the names
|
|
1894
|
+
# are converted to the Rack spellings the environment uses, such as
|
|
1895
|
+
# `HTTP_ACCEPT`.
|
|
1896
|
+
#
|
|
1897
|
+
# Behaves like {#add_headers}: merges when called multiple times, and a
|
|
1898
|
+
# block takes precedence over the argument.
|
|
1899
|
+
#
|
|
1900
|
+
# _@param_ `given_headers` — A hash containing request headers.
|
|
1901
|
+
#
|
|
1902
|
+
# _@see_ `#add_request_environment`
|
|
1903
|
+
#
|
|
1904
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
1905
|
+
def add_request_headers: (?::Hash[String, Object]? given_headers) ?{ () -> ::Hash[String, Object] } -> void
|
|
1906
|
+
|
|
1907
|
+
# Add values from the request environment to the transaction.
|
|
1908
|
+
#
|
|
1909
|
+
# These are the values a Rack environment holds that are not request
|
|
1910
|
+
# headers, such as `REMOTE_ADDR` and `QUERY_STRING`. Name each one the way
|
|
1911
|
+
# Rack names it. Use {#add_request_headers} for the request headers.
|
|
1912
|
+
#
|
|
1913
|
+
# Behaves like {#add_headers}: merges when called multiple times, and a
|
|
1914
|
+
# block takes precedence over the argument.
|
|
1915
|
+
#
|
|
1916
|
+
# _@param_ `given_environment` — A hash containing request environment values.
|
|
1917
|
+
#
|
|
1918
|
+
# _@see_ `#add_request_headers`
|
|
1919
|
+
#
|
|
1920
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
1921
|
+
def add_request_environment: (?::Hash[String, Object]? given_environment) ?{ () -> ::Hash[String, Object] } -> void
|
|
1922
|
+
|
|
1802
1923
|
# Add custom data to the transaction.
|
|
1803
1924
|
#
|
|
1804
1925
|
# _@param_ `data` — Custom data to add to the transaction.
|
|
@@ -2648,11 +2769,86 @@ module Appsignal
|
|
|
2648
2769
|
# # { "PATH_INFO" => "/some-path", "HTTP_USER_AGENT" => "Firefox" }
|
|
2649
2770
|
# ```
|
|
2650
2771
|
#
|
|
2772
|
+
# _@deprecated_ — Use {#add_request_headers} for request headers and
|
|
2773
|
+
# {#add_request_environment} for the values a Rack environment holds
|
|
2774
|
+
# that are not request headers. This method takes both kinds at once,
|
|
2775
|
+
# so it has to work out which of them each value is.
|
|
2776
|
+
#
|
|
2777
|
+
# _@see_ `#add_request_headers`
|
|
2778
|
+
#
|
|
2779
|
+
# _@see_ `#add_request_environment`
|
|
2780
|
+
#
|
|
2651
2781
|
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
2652
2782
|
#
|
|
2653
2783
|
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
2654
2784
|
def add_headers: (?::Hash[String, Object]? headers) ?{ () -> ::Hash[String, Object] } -> void
|
|
2655
2785
|
|
|
2786
|
+
# Add request headers to the current transaction.
|
|
2787
|
+
#
|
|
2788
|
+
# Request headers are automatically added by most of our integrations. It
|
|
2789
|
+
# should not be necessary to call this method unless you want to also
|
|
2790
|
+
# report different request headers.
|
|
2791
|
+
#
|
|
2792
|
+
# Name each header the way OpenTelemetry names it, in lowercase and with
|
|
2793
|
+
# dashes. In agent mode the names are converted to the Rack spellings the
|
|
2794
|
+
# environment uses, so `accept` is reported as `HTTP_ACCEPT`.
|
|
2795
|
+
#
|
|
2796
|
+
# To filter request headers, see our request header filtering guide.
|
|
2797
|
+
#
|
|
2798
|
+
# When both the `headers` argument and a block is given to this method,
|
|
2799
|
+
# the block is leading and the argument will _not_ be used.
|
|
2800
|
+
#
|
|
2801
|
+
# _@param_ `headers` — The request headers to add to the transaction.
|
|
2802
|
+
#
|
|
2803
|
+
# Add request headers
|
|
2804
|
+
# ```ruby
|
|
2805
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
2806
|
+
# # The request headers will include:
|
|
2807
|
+
# # { "accept" => "text/html" }
|
|
2808
|
+
# ```
|
|
2809
|
+
#
|
|
2810
|
+
# Calling `add_request_headers` multiple times merges the values
|
|
2811
|
+
# ```ruby
|
|
2812
|
+
# Appsignal.add_request_headers("accept" => "text/html")
|
|
2813
|
+
# Appsignal.add_request_headers("user-agent" => "Firefox")
|
|
2814
|
+
# # The request headers will include:
|
|
2815
|
+
# # { "accept" => "text/html", "user-agent" => "Firefox" }
|
|
2816
|
+
# ```
|
|
2817
|
+
#
|
|
2818
|
+
# _@see_ `#add_request_environment`
|
|
2819
|
+
#
|
|
2820
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
2821
|
+
#
|
|
2822
|
+
# _@see_ `https://docs.appsignal.com/guides/filter-data/filter-headers.html` — Request headers filtering guide
|
|
2823
|
+
def add_request_headers: (?::Hash[String, Object]? headers) ?{ () -> ::Hash[String, Object] } -> void
|
|
2824
|
+
|
|
2825
|
+
# Add values from the request environment to the current transaction.
|
|
2826
|
+
#
|
|
2827
|
+
# These are the values a Rack environment holds that are not request
|
|
2828
|
+
# headers, such as `REMOTE_ADDR` and `QUERY_STRING`. Name each one the
|
|
2829
|
+
# way Rack names it. Use {#add_request_headers} for the request headers.
|
|
2830
|
+
#
|
|
2831
|
+
# The request environment is automatically added by most of our
|
|
2832
|
+
# integrations. It should not be necessary to call this method unless you
|
|
2833
|
+
# want to also report different values.
|
|
2834
|
+
#
|
|
2835
|
+
# When both the `environment` argument and a block is given to this
|
|
2836
|
+
# method, the block is leading and the argument will _not_ be used.
|
|
2837
|
+
#
|
|
2838
|
+
# _@param_ `environment` — The request environment values to add to the transaction.
|
|
2839
|
+
#
|
|
2840
|
+
# Add request environment values
|
|
2841
|
+
# ```ruby
|
|
2842
|
+
# Appsignal.add_request_environment("REMOTE_ADDR" => "127.0.0.1")
|
|
2843
|
+
# # The request environment will include:
|
|
2844
|
+
# # { "REMOTE_ADDR" => "127.0.0.1" }
|
|
2845
|
+
# ```
|
|
2846
|
+
#
|
|
2847
|
+
# _@see_ `#add_request_headers`
|
|
2848
|
+
#
|
|
2849
|
+
# _@see_ `https://docs.appsignal.com/guides/custom-data/sample-data.html` — Sample data guide
|
|
2850
|
+
def add_request_environment: (?::Hash[String, Object]? environment) ?{ () -> ::Hash[String, Object] } -> void
|
|
2851
|
+
|
|
2656
2852
|
# Add breadcrumbs to the transaction.
|
|
2657
2853
|
#
|
|
2658
2854
|
# Breadcrumbs can be used to trace what path a user has taken
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appsignal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.0.0.rc.
|
|
4
|
+
version: 5.0.0.rc.2
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Beekman
|
|
@@ -306,6 +306,7 @@ files:
|
|
|
306
306
|
- lib/appsignal/opentelemetry/http_response.rb
|
|
307
307
|
- lib/appsignal/opentelemetry/http_server_request.rb
|
|
308
308
|
- lib/appsignal/opentelemetry/messaging.rb
|
|
309
|
+
- lib/appsignal/opentelemetry/proxied_exporter.rb
|
|
309
310
|
- lib/appsignal/opentelemetry/rendering.rb
|
|
310
311
|
- lib/appsignal/opentelemetry/sql_db_system.rb
|
|
311
312
|
- lib/appsignal/probes.rb
|
|
@@ -339,6 +340,7 @@ files:
|
|
|
339
340
|
- lib/appsignal/utils/ndjson.rb
|
|
340
341
|
- lib/appsignal/utils/query_params_sanitizer.rb
|
|
341
342
|
- lib/appsignal/utils/rails_helper.rb
|
|
343
|
+
- lib/appsignal/utils/request_headers.rb
|
|
342
344
|
- lib/appsignal/utils/sample_data_sanitizer.rb
|
|
343
345
|
- lib/appsignal/utils/stdout_and_logger_message.rb
|
|
344
346
|
- lib/appsignal/version.rb
|