Merge remote-tracking branch 'origin/main' into ds-apiserver-schema-builder
This commit is contained in:
@@ -106,10 +106,9 @@ require (
|
||||
github.com/zeebo/xxh3 v1.0.2 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 // indirect
|
||||
go.opentelemetry.io/otel v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
|
||||
|
||||
@@ -285,14 +285,14 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 h1:wCeciVlAfb5DC8MQl/DlmAv/FVPNpQgFvI/71+hatuc=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0/go.mod h1:WfEApdZDMlLUAev/0QQpr8EJ/z0VWDKYZ5tF5RH5T1U=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 h1:l8XCsDh7L6Z7PB+vlw1s4ufNab+ayT2RMNdvDE/UyPc=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0/go.mod h1:XAOSk4bqj5vtoiY08bexeiafzxdXeLlxKFnwscvn8Fc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 h1:nXGeLvT1QtCAhkASkP/ksjkTKZALIaQBIW+JSIw1KIc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0/go.mod h1:oMvOXk78ZR3KEuPMBgp/ThAMDy9ku/eyUVztr+3G6Wo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 h1:oPW/SRFyHgIgxrvNhSBzqvZER2N5kRlci3/rGTOuyWo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0/go.mod h1:B9Oka5QVD0bnmZNO6gBbBta6nohD/1Z+f9waH2oXyBs=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
|
||||
+3
-3
@@ -395,10 +395,10 @@ require (
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect
|
||||
go.opentelemetry.io/contrib/exporters/autoexport v0.61.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.12.2 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.12.2 // indirect
|
||||
|
||||
+12
-10
@@ -1087,8 +1087,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/m3db/prometheus_remote_client_golang v0.4.4 h1:DsAIjVKoCp7Ym35tAOFL1OuMLIdIikAEHeNPHY+yyM8=
|
||||
github.com/m3db/prometheus_remote_client_golang v0.4.4/go.mod h1:wHfVbA3eAK6dQvKjCkHhusWYegCk3bDGkA15zymSHdc=
|
||||
github.com/madflojo/testcerts v1.1.1 h1:YsSHWV79nMNZK0mJtwXjKoYHjJEbLPFefR8TxmmWupY=
|
||||
github.com/madflojo/testcerts v1.1.1/go.mod h1:MW8sh39gLnkKh4K0Nc55AyHEDl9l/FBLDUsQhpmkuo0=
|
||||
github.com/madflojo/testcerts v1.4.0 h1:I09gN0C1ly9IgeVNcAqKk8RAKIJTe3QnFrrPBDyvzN4=
|
||||
github.com/madflojo/testcerts v1.4.0/go.mod h1:MW8sh39gLnkKh4K0Nc55AyHEDl9l/FBLDUsQhpmkuo0=
|
||||
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
|
||||
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
@@ -1583,8 +1583,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/collector/pdata v1.30.0 h1:j3jyq9um436r6WzWySzexP2nLnFdmL5uVBYAlyr9nDM=
|
||||
go.opentelemetry.io/collector/pdata v1.30.0/go.mod h1:0Bxu1ktuj4wE7PIASNSvd0SdBscQ1PLtYasymJ13/Cs=
|
||||
go.opentelemetry.io/collector/featuregate v1.43.0 h1:Aq8UR5qv1zNlbbkTyqv8kLJtnoQMq/sG1/jS9o1cCJI=
|
||||
go.opentelemetry.io/collector/featuregate v1.43.0/go.mod h1:d0tiRzVYrytB6LkcYgz2ESFTv7OktRPQe0QEQcPt1L4=
|
||||
go.opentelemetry.io/collector/pdata v1.43.0 h1:zVkj2hcjiMLwX+QDDNwb7iTh3LBjNXKv2qPSgj1Rzb4=
|
||||
go.opentelemetry.io/collector/pdata v1.43.0/go.mod h1:KsJzdDG9e5BaHlmYr0sqdSEKeEiSfKzoF+rdWU7J//w=
|
||||
go.opentelemetry.io/collector/semconv v0.124.0 h1:YTdo3UFwNyDQCh9DiSm2rbzAgBuwn/9dNZ0rv454goA=
|
||||
go.opentelemetry.io/collector/semconv v0.124.0/go.mod h1:te6VQ4zZJO5Lp8dM2XIhDxDiL45mwX0YAQQWRQ0Qr9U=
|
||||
go.opentelemetry.io/contrib/bridges/prometheus v0.61.0 h1:RyrtJzu5MAmIcbRrwg75b+w3RlZCP0vJByDVzcpAe3M=
|
||||
@@ -1595,14 +1597,14 @@ go.opentelemetry.io/contrib/exporters/autoexport v0.61.0 h1:XfzKtKSrbtYk9TNCF8dk
|
||||
go.opentelemetry.io/contrib/exporters/autoexport v0.61.0/go.mod h1:N6otC+qXTD5bAnbK2O1f/1SXq3cX+3KYSWrkBUqG0cw=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 h1:wCeciVlAfb5DC8MQl/DlmAv/FVPNpQgFvI/71+hatuc=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0/go.mod h1:WfEApdZDMlLUAev/0QQpr8EJ/z0VWDKYZ5tF5RH5T1U=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 h1:l8XCsDh7L6Z7PB+vlw1s4ufNab+ayT2RMNdvDE/UyPc=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0/go.mod h1:XAOSk4bqj5vtoiY08bexeiafzxdXeLlxKFnwscvn8Fc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 h1:nXGeLvT1QtCAhkASkP/ksjkTKZALIaQBIW+JSIw1KIc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0/go.mod h1:oMvOXk78ZR3KEuPMBgp/ThAMDy9ku/eyUVztr+3G6Wo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 h1:oPW/SRFyHgIgxrvNhSBzqvZER2N5kRlci3/rGTOuyWo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0/go.mod h1:B9Oka5QVD0bnmZNO6gBbBta6nohD/1Z+f9waH2oXyBs=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
|
||||
@@ -1234,6 +1234,8 @@ log_endpoint_requests_per_second_limit = 3
|
||||
# Max requests accepted per short interval of time for Grafana backend log ingestion endpoint (/log)
|
||||
log_endpoint_burst_limit = 15
|
||||
|
||||
# Enables the bot filter for the Grafana Faro JavaScript agent integration. Default is `false`. When enabled, it will filter out requests from known bots and crawlers.
|
||||
bot_filter_enabled = false
|
||||
|
||||
#################################### Usage Quotas ########################
|
||||
[quota]
|
||||
|
||||
@@ -1206,6 +1206,9 @@
|
||||
# See https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/instrument/web-vitals/#web-vitals-attribution-data
|
||||
;web_vitals_attribution_enabled = true
|
||||
|
||||
# Enables the bot filter for the Grafana Faro JavaScript agent integration. Default is `false`. When enabled, it will filter out requests from known bots and crawlers.
|
||||
;bot_filter_enabled = false
|
||||
|
||||
#################################### Usage Quotas ########################
|
||||
[quota]
|
||||
; enabled = false
|
||||
|
||||
@@ -1679,6 +1679,10 @@ Requests per second limit enforced per an extended period, for Grafana backend l
|
||||
|
||||
Maximum requests accepted per short interval of time for Grafana backend log ingestion endpoint, `/log-grafana-javascript-agent`. Default is `15`.
|
||||
|
||||
#### `bot_filter_enabled`
|
||||
|
||||
Enables the bot filter for the Grafana Faro JavaScript agent integration. Default is `false`. When enabled, it will filter out requests from known bots and crawlers.
|
||||
|
||||
<hr>
|
||||
|
||||
### `[quota]`
|
||||
|
||||
@@ -132,7 +132,7 @@ require (
|
||||
github.com/json-iterator/go v1.1.12 // @grafana/grafana-backend-group
|
||||
github.com/lib/pq v1.10.9 // @grafana/grafana-backend-group
|
||||
github.com/m3db/prometheus_remote_client_golang v0.4.4 // @grafana/grafana-backend-group
|
||||
github.com/madflojo/testcerts v1.1.1 // @grafana/alerting-backend
|
||||
github.com/madflojo/testcerts v1.4.0 // @grafana/alerting-backend
|
||||
github.com/mattn/go-isatty v0.0.20 // @grafana/grafana-backend-group
|
||||
github.com/mattn/go-sqlite3 v1.14.22 // @grafana/grafana-backend-group
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // @grafana/alerting-backend
|
||||
@@ -181,12 +181,12 @@ require (
|
||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // @grafana/grafana-operator-experience-squad
|
||||
github.com/yudai/gojsondiff v1.0.0 // @grafana/grafana-backend-group
|
||||
go.opencensus.io v0.24.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/collector/pdata v1.30.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/collector/pdata v1.43.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // @grafana/plugins-platform-backend
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 // @grafana/grafana-operator-experience-squad
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // @grafana/grafana-operator-experience-squad
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // @grafana/sharing-squad
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/otel v1.38.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // @grafana/grafana-backend-group
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // @grafana/grafana-backend-group
|
||||
@@ -653,7 +653,10 @@ require (
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
)
|
||||
|
||||
require github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
require (
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
go.opentelemetry.io/collector/featuregate v1.43.0 // indirect
|
||||
)
|
||||
|
||||
// Use fork of crewjam/saml with fixes for some issues until changes get merged into upstream
|
||||
replace github.com/crewjam/saml => github.com/grafana/saml v0.4.15-0.20240917091248-ae3bbdad8a56
|
||||
|
||||
@@ -1928,8 +1928,8 @@ github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuz
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o=
|
||||
github.com/m3db/prometheus_remote_client_golang v0.4.4 h1:DsAIjVKoCp7Ym35tAOFL1OuMLIdIikAEHeNPHY+yyM8=
|
||||
github.com/m3db/prometheus_remote_client_golang v0.4.4/go.mod h1:wHfVbA3eAK6dQvKjCkHhusWYegCk3bDGkA15zymSHdc=
|
||||
github.com/madflojo/testcerts v1.1.1 h1:YsSHWV79nMNZK0mJtwXjKoYHjJEbLPFefR8TxmmWupY=
|
||||
github.com/madflojo/testcerts v1.1.1/go.mod h1:MW8sh39gLnkKh4K0Nc55AyHEDl9l/FBLDUsQhpmkuo0=
|
||||
github.com/madflojo/testcerts v1.4.0 h1:I09gN0C1ly9IgeVNcAqKk8RAKIJTe3QnFrrPBDyvzN4=
|
||||
github.com/madflojo/testcerts v1.4.0/go.mod h1:MW8sh39gLnkKh4K0Nc55AyHEDl9l/FBLDUsQhpmkuo0=
|
||||
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
|
||||
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
@@ -2578,8 +2578,10 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/collector v0.124.0 h1:g/dfdGFhBcQI0ggGxTmGlJnJ6Yl6T2gVxQoIj4UfXCc=
|
||||
go.opentelemetry.io/collector/pdata v1.30.0 h1:j3jyq9um436r6WzWySzexP2nLnFdmL5uVBYAlyr9nDM=
|
||||
go.opentelemetry.io/collector/pdata v1.30.0/go.mod h1:0Bxu1ktuj4wE7PIASNSvd0SdBscQ1PLtYasymJ13/Cs=
|
||||
go.opentelemetry.io/collector/featuregate v1.43.0 h1:Aq8UR5qv1zNlbbkTyqv8kLJtnoQMq/sG1/jS9o1cCJI=
|
||||
go.opentelemetry.io/collector/featuregate v1.43.0/go.mod h1:d0tiRzVYrytB6LkcYgz2ESFTv7OktRPQe0QEQcPt1L4=
|
||||
go.opentelemetry.io/collector/pdata v1.43.0 h1:zVkj2hcjiMLwX+QDDNwb7iTh3LBjNXKv2qPSgj1Rzb4=
|
||||
go.opentelemetry.io/collector/pdata v1.43.0/go.mod h1:KsJzdDG9e5BaHlmYr0sqdSEKeEiSfKzoF+rdWU7J//w=
|
||||
go.opentelemetry.io/collector/pdata/pprofile v0.124.0 h1:ZjL9wKqzP4BHj0/F1jfGxs1Va8B7xmYayipZeNVoWJE=
|
||||
go.opentelemetry.io/collector/pdata/pprofile v0.124.0/go.mod h1:1EN3Gw5LSI4fSVma/Yfv/6nqeuYgRTm1/kmG5nE5Oyo=
|
||||
go.opentelemetry.io/collector/semconv v0.124.0 h1:YTdo3UFwNyDQCh9DiSm2rbzAgBuwn/9dNZ0rv454goA=
|
||||
@@ -2593,15 +2595,15 @@ go.opentelemetry.io/contrib/exporters/autoexport v0.61.0/go.mod h1:N6otC+qXTD5bA
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.55.0/go.mod h1:rsg1EO8LXSs2po50PB5CeY/MSVlhghuKBgXlKnqm6ks=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 h1:wCeciVlAfb5DC8MQl/DlmAv/FVPNpQgFvI/71+hatuc=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0/go.mod h1:WfEApdZDMlLUAev/0QQpr8EJ/z0VWDKYZ5tF5RH5T1U=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 h1:l8XCsDh7L6Z7PB+vlw1s4ufNab+ayT2RMNdvDE/UyPc=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0/go.mod h1:XAOSk4bqj5vtoiY08bexeiafzxdXeLlxKFnwscvn8Fc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 h1:nXGeLvT1QtCAhkASkP/ksjkTKZALIaQBIW+JSIw1KIc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0/go.mod h1:oMvOXk78ZR3KEuPMBgp/ThAMDy9ku/eyUVztr+3G6Wo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 h1:oPW/SRFyHgIgxrvNhSBzqvZER2N5kRlci3/rGTOuyWo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0/go.mod h1:B9Oka5QVD0bnmZNO6gBbBta6nohD/1Z+f9waH2oXyBs=
|
||||
go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc=
|
||||
@@ -2658,6 +2660,12 @@ go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI
|
||||
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
|
||||
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
|
||||
go.opentelemetry.io/proto/slim/otlp v1.8.0 h1:afcLwp2XOeCbGrjufT1qWyruFt+6C9g5SOuymrSPUXQ=
|
||||
go.opentelemetry.io/proto/slim/otlp v1.8.0/go.mod h1:Yaa5fjYm1SMCq0hG0x/87wV1MP9H5xDuG/1+AhvBcsI=
|
||||
go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.1.0 h1:Uc+elixz922LHx5colXGi1ORbsW8DTIGM+gg+D9V7HE=
|
||||
go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.1.0/go.mod h1:VyU6dTWBWv6h9w/+DYgSZAPMabWbPTFTuxp25sM8+s0=
|
||||
go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.1.0 h1:i8YpvWGm/Uq1koL//bnbJ/26eV3OrKWm09+rDYo7keU=
|
||||
go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.1.0/go.mod h1:pQ70xHY/ZVxNUBPn+qUWPl8nwai87eWdqL3M37lNi9A=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
||||
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||
|
||||
@@ -1856,6 +1856,7 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.5
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0/go.mod h1:CosX/aS4eHnG9D7nESYpV753l4j9q5j3SL/PUYd2lR8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0/go.mod h1:WfEApdZDMlLUAev/0QQpr8EJ/z0VWDKYZ5tF5RH5T1U=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q=
|
||||
@@ -1869,6 +1870,8 @@ go.opentelemetry.io/contrib/otelconf v0.15.0/go.mod h1:OPH1seO5z9dp1P26gnLtoM9ht
|
||||
go.opentelemetry.io/contrib/propagators/b3 v1.35.0 h1:DpwKW04LkdFRFCIgM3sqwTJA/QREHMeMHYPWP1WeaPQ=
|
||||
go.opentelemetry.io/contrib/propagators/b3 v1.35.0/go.mod h1:9+SNxwqvCWo1qQwUpACBY5YKNVxFJn5mlbXg/4+uKBg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.35.0/go.mod h1:0ciyFyYZxE6JqRAQvIgGRabKWDUmNdW3GAQb6y/RlFU=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0/go.mod h1:XAOSk4bqj5vtoiY08bexeiafzxdXeLlxKFnwscvn8Fc=
|
||||
go.opentelemetry.io/contrib/zpages v0.60.0 h1:wOM9ie1Hz4H88L9KE6GrGbKJhfm+8F1NfW/Y3q9Xt+8=
|
||||
go.opentelemetry.io/contrib/zpages v0.60.0/go.mod h1:xqfToSRGh2MYUsfyErNz8jnNDPlnpZqWM/y6Z2Cx7xw=
|
||||
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
|
||||
|
||||
+1
-1
@@ -279,7 +279,7 @@
|
||||
"@formatjs/intl-durationformat": "^0.7.0",
|
||||
"@glideapps/glide-data-grid": "^6.0.0",
|
||||
"@grafana/alerting": "workspace:*",
|
||||
"@grafana/assistant": "0.0.18",
|
||||
"@grafana/assistant": "0.1.0",
|
||||
"@grafana/aws-sdk": "0.7.1",
|
||||
"@grafana/azure-sdk": "0.0.7",
|
||||
"@grafana/data": "workspace:*",
|
||||
|
||||
@@ -1200,11 +1200,6 @@ export interface FeatureToggles {
|
||||
*/
|
||||
tempoSearchBackendMigration?: boolean;
|
||||
/**
|
||||
* Filter out bots from collecting data for Frontend Observability
|
||||
* @default false
|
||||
*/
|
||||
filterOutBotsFromFrontendLogs?: boolean;
|
||||
/**
|
||||
* Prioritize loading plugins from the CDN before other sources
|
||||
* @default false
|
||||
*/
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
"typescript": "5.9.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@grafana/assistant": "^0.0.17 || ^0.0.18",
|
||||
"@grafana/assistant": "^0.1.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,10 @@ import FlameGraphContainer, { labelSearch } from './FlameGraphContainer';
|
||||
import { MIN_WIDTH_TO_SHOW_BOTH_TOPTABLE_AND_FLAMEGRAPH } from './constants';
|
||||
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
useAssistant: jest.fn(() => [false, null]), // [isAvailable, openAssistant]
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: false,
|
||||
openAssistant: undefined,
|
||||
}),
|
||||
createAssistantContextItem: jest.fn(),
|
||||
OpenAssistantButton: () => <div>OpenAssistantButton</div>,
|
||||
}));
|
||||
|
||||
@@ -8,7 +8,10 @@ import FlameGraphHeader from './FlameGraphHeader';
|
||||
import { ColorScheme, SelectedView } from './types';
|
||||
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
useAssistant: jest.fn(() => [false, null]), // [isAvailable, openAssistant]
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: false,
|
||||
openAssistant: undefined,
|
||||
}),
|
||||
createAssistantContextItem: jest.fn(),
|
||||
OpenAssistantButton: () => <div>OpenAssistantButton</div>,
|
||||
}));
|
||||
|
||||
@@ -161,6 +161,7 @@ export class GrafanaBootConfig {
|
||||
tracingInstrumentalizationEnabled: false,
|
||||
webVitalsAttribution: false,
|
||||
internalLoggerLevel: 0,
|
||||
botFilterEnabled: false,
|
||||
};
|
||||
pluginCatalogURL = 'https://grafana.com/grafana/plugins/';
|
||||
pluginAdminEnabled = true;
|
||||
|
||||
@@ -123,10 +123,10 @@ require (
|
||||
go.etcd.io/etcd/client/v3 v3.6.4 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||
|
||||
@@ -328,14 +328,14 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 h1:wCeciVlAfb5DC8MQl/DlmAv/FVPNpQgFvI/71+hatuc=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0/go.mod h1:WfEApdZDMlLUAev/0QQpr8EJ/z0VWDKYZ5tF5RH5T1U=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 h1:l8XCsDh7L6Z7PB+vlw1s4ufNab+ayT2RMNdvDE/UyPc=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0/go.mod h1:XAOSk4bqj5vtoiY08bexeiafzxdXeLlxKFnwscvn8Fc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 h1:nXGeLvT1QtCAhkASkP/ksjkTKZALIaQBIW+JSIw1KIc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0/go.mod h1:oMvOXk78ZR3KEuPMBgp/ThAMDy9ku/eyUVztr+3G6Wo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 h1:oPW/SRFyHgIgxrvNhSBzqvZER2N5kRlci3/rGTOuyWo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0/go.mod h1:B9Oka5QVD0bnmZNO6gBbBta6nohD/1Z+f9waH2oXyBs=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
|
||||
@@ -9,7 +9,7 @@ require (
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
github.com/stretchr/testify v1.11.1
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
go.opentelemetry.io/otel/trace v1.38.0
|
||||
k8s.io/apimachinery v0.34.1
|
||||
|
||||
@@ -174,8 +174,8 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 h1:nXGeLvT1QtCAhkASkP/ksjkTKZALIaQBIW+JSIw1KIc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0/go.mod h1:oMvOXk78ZR3KEuPMBgp/ThAMDy9ku/eyUVztr+3G6Wo=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
|
||||
|
||||
+3
-4
@@ -107,10 +107,9 @@ require (
|
||||
go.mongodb.org/mongo-driver v1.17.3 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||
|
||||
+6
-6
@@ -322,14 +322,14 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0 h1:wCeciVlAfb5DC8MQl/DlmAv/FVPNpQgFvI/71+hatuc=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0/go.mod h1:WfEApdZDMlLUAev/0QQpr8EJ/z0VWDKYZ5tF5RH5T1U=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0 h1:l8XCsDh7L6Z7PB+vlw1s4ufNab+ayT2RMNdvDE/UyPc=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.31.0/go.mod h1:XAOSk4bqj5vtoiY08bexeiafzxdXeLlxKFnwscvn8Fc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 h1:nXGeLvT1QtCAhkASkP/ksjkTKZALIaQBIW+JSIw1KIc=
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0/go.mod h1:oMvOXk78ZR3KEuPMBgp/ThAMDy9ku/eyUVztr+3G6Wo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 h1:oPW/SRFyHgIgxrvNhSBzqvZER2N5kRlci3/rGTOuyWo=
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0/go.mod h1:B9Oka5QVD0bnmZNO6gBbBta6nohD/1Z+f9waH2oXyBs=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
|
||||
@@ -2080,14 +2080,6 @@ var (
|
||||
Expression: "false",
|
||||
RequiresRestart: true,
|
||||
},
|
||||
{
|
||||
Name: "filterOutBotsFromFrontendLogs",
|
||||
Description: "Filter out bots from collecting data for Frontend Observability",
|
||||
Stage: FeatureStageExperimental,
|
||||
FrontendOnly: true,
|
||||
Owner: grafanaPluginsPlatformSquad,
|
||||
Expression: "false",
|
||||
},
|
||||
{
|
||||
Name: "cdnPluginsLoadFirst",
|
||||
Description: "Prioritize loading plugins from the CDN before other sources",
|
||||
|
||||
@@ -267,6 +267,5 @@ azureResourcePickerUpdates,preview,@grafana/partner-datasources,false,false,true
|
||||
prometheusTypeMigration,experimental,@grafana/partner-datasources,false,true,false
|
||||
pluginContainers,privatePreview,@grafana/plugins-platform-backend,false,true,false
|
||||
tempoSearchBackendMigration,GA,@grafana/oss-big-tent,false,true,false
|
||||
filterOutBotsFromFrontendLogs,experimental,@grafana/plugins-platform-backend,false,false,true
|
||||
cdnPluginsLoadFirst,experimental,@grafana/plugins-platform-backend,false,false,false
|
||||
cdnPluginsUrls,experimental,@grafana/plugins-platform-backend,false,false,false
|
||||
|
||||
|
@@ -1078,10 +1078,6 @@ const (
|
||||
// Run search queries through the tempo backend
|
||||
FlagTempoSearchBackendMigration = "tempoSearchBackendMigration"
|
||||
|
||||
// FlagFilterOutBotsFromFrontendLogs
|
||||
// Filter out bots from collecting data for Frontend Observability
|
||||
FlagFilterOutBotsFromFrontendLogs = "filterOutBotsFromFrontendLogs"
|
||||
|
||||
// FlagCdnPluginsLoadFirst
|
||||
// Prioritize loading plugins from the CDN before other sources
|
||||
FlagCdnPluginsLoadFirst = "cdnPluginsLoadFirst"
|
||||
|
||||
@@ -1692,7 +1692,8 @@
|
||||
"metadata": {
|
||||
"name": "filterOutBotsFromFrontendLogs",
|
||||
"resourceVersion": "1758000919535",
|
||||
"creationTimestamp": "2025-09-16T05:35:19Z"
|
||||
"creationTimestamp": "2025-09-16T05:35:19Z",
|
||||
"deletionTimestamp": "2025-10-13T11:09:22Z"
|
||||
},
|
||||
"spec": {
|
||||
"description": "Filter out bots from collecting data for Frontend Observability",
|
||||
|
||||
@@ -14,6 +14,7 @@ type GrafanaJavascriptAgent struct {
|
||||
CSPInstrumentalizationEnabled bool `json:"cspInstrumentalizationEnabled"`
|
||||
TracingInstrumentalizationEnabled bool `json:"tracingInstrumentalizationEnabled"`
|
||||
WebVitalsAttributionEnabled bool `json:"webVitalsAttributionEnabled"`
|
||||
BotFilterEnabled bool `json:"botFilterEnabled"`
|
||||
}
|
||||
|
||||
func (cfg *Cfg) readGrafanaJavascriptAgentConfig() {
|
||||
@@ -32,5 +33,6 @@ func (cfg *Cfg) readGrafanaJavascriptAgentConfig() {
|
||||
CSPInstrumentalizationEnabled: raw.Key("instrumentations_csp_enabled").MustBool(true),
|
||||
TracingInstrumentalizationEnabled: raw.Key("instrumentations_tracing_enabled").MustBool(true),
|
||||
WebVitalsAttributionEnabled: raw.Key("web_vitals_attribution_enabled").MustBool(true),
|
||||
BotFilterEnabled: raw.Key("bot_filter_enabled").MustBool(false),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
import { renderHook } from '@testing-library/react';
|
||||
|
||||
import { useAssistant } from '@grafana/assistant';
|
||||
|
||||
import { useShortcuts } from './HelpModal';
|
||||
|
||||
// Mock the assistant hook
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
useAssistant: jest.fn(),
|
||||
}));
|
||||
|
||||
// Mock getModKey
|
||||
jest.mock('app/core/utils/browser', () => ({
|
||||
getModKey: jest.fn(() => 'ctrl'),
|
||||
}));
|
||||
|
||||
const mockUseAssistant = useAssistant as jest.MockedFunction<typeof useAssistant>;
|
||||
|
||||
describe('useShortcuts', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
it('should return shortcuts without assistant shortcut when assistant is not available', () => {
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: false,
|
||||
toggleAssistant: jest.fn(),
|
||||
} as unknown as ReturnType<typeof useAssistant>);
|
||||
|
||||
const { result } = renderHook(() => useShortcuts());
|
||||
|
||||
expect(result.current).toHaveLength(4); // Global, Time range, Dashboard, Focused panel
|
||||
|
||||
// Check that global shortcuts don't include assistant shortcut
|
||||
const globalCategory = result.current.find((category) => category.category.includes('Global'));
|
||||
expect(globalCategory).toBeDefined();
|
||||
|
||||
const assistantShortcut = globalCategory!.shortcuts.find((shortcut) => shortcut.keys.includes('ctrl + .'));
|
||||
expect(assistantShortcut).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should return shortcuts with assistant shortcut when assistant is available', () => {
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: true,
|
||||
openAssistant: jest.fn(),
|
||||
closeAssistant: jest.fn(),
|
||||
toggleAssistant: jest.fn(),
|
||||
});
|
||||
|
||||
const { result } = renderHook(() => useShortcuts());
|
||||
|
||||
expect(result.current).toHaveLength(4); // Global, Time range, Dashboard, Focused panel
|
||||
|
||||
// Check that global shortcuts include assistant shortcut
|
||||
const globalCategory = result.current.find((category) => category.category.includes('Global'));
|
||||
expect(globalCategory).toBeDefined();
|
||||
|
||||
const assistantShortcut = globalCategory!.shortcuts.find((shortcut) => shortcut.keys.includes('ctrl + .'));
|
||||
expect(assistantShortcut).toBeDefined();
|
||||
expect(assistantShortcut!.description).toContain('Assistant');
|
||||
});
|
||||
|
||||
it('should include all expected shortcut categories', () => {
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: false,
|
||||
openAssistant: jest.fn(),
|
||||
closeAssistant: jest.fn(),
|
||||
toggleAssistant: jest.fn(),
|
||||
});
|
||||
|
||||
const { result } = renderHook(() => useShortcuts());
|
||||
|
||||
const categories = result.current.map((category) => category.category);
|
||||
|
||||
expect(categories).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.stringContaining('Global'),
|
||||
expect.stringContaining('Time range'),
|
||||
expect.stringContaining('Dashboard'),
|
||||
expect.stringContaining('Focused panel'),
|
||||
])
|
||||
);
|
||||
});
|
||||
|
||||
it('should use the correct modKey in shortcuts', () => {
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: false,
|
||||
openAssistant: jest.fn(),
|
||||
closeAssistant: jest.fn(),
|
||||
toggleAssistant: jest.fn(),
|
||||
});
|
||||
|
||||
const { result } = renderHook(() => useShortcuts());
|
||||
|
||||
// Find a shortcut that uses modKey (like save dashboard)
|
||||
const dashboardCategory = result.current.find((category) => category.category.includes('Dashboard'));
|
||||
const saveShortcut = dashboardCategory!.shortcuts.find((shortcut) =>
|
||||
shortcut.description.includes('Save dashboard')
|
||||
);
|
||||
|
||||
expect(saveShortcut).toBeDefined();
|
||||
expect(saveShortcut!.keys[0]).toBe('ctrl + s');
|
||||
});
|
||||
|
||||
it('should memoize results when dependencies do not change', () => {
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: false,
|
||||
openAssistant: jest.fn(),
|
||||
closeAssistant: jest.fn(),
|
||||
toggleAssistant: jest.fn(),
|
||||
});
|
||||
|
||||
const { result, rerender } = renderHook(() => useShortcuts());
|
||||
const firstResult = result.current;
|
||||
|
||||
// Rerender without changing dependencies
|
||||
rerender();
|
||||
|
||||
// Should return the same reference (memoized)
|
||||
expect(result.current).toBe(firstResult);
|
||||
});
|
||||
|
||||
it('should update when assistant availability changes', () => {
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: false,
|
||||
openAssistant: jest.fn(),
|
||||
closeAssistant: jest.fn(),
|
||||
toggleAssistant: jest.fn(),
|
||||
});
|
||||
|
||||
const { result, rerender } = renderHook(() => useShortcuts());
|
||||
const firstResult = result.current;
|
||||
|
||||
// Change assistant availability
|
||||
mockUseAssistant.mockReturnValue({
|
||||
isAvailable: true,
|
||||
openAssistant: jest.fn(),
|
||||
closeAssistant: jest.fn(),
|
||||
toggleAssistant: jest.fn(),
|
||||
});
|
||||
rerender();
|
||||
|
||||
// Should return a different reference (not memoized)
|
||||
expect(result.current).not.toBe(firstResult);
|
||||
|
||||
// And should now include assistant shortcut
|
||||
const globalCategory = result.current.find((category) => category.category.includes('Global'));
|
||||
const assistantShortcut = globalCategory!.shortcuts.find((shortcut) => shortcut.keys.includes('ctrl + .'));
|
||||
expect(assistantShortcut).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -1,173 +1,19 @@
|
||||
import { css } from '@emotion/css';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { useAssistant } from '@grafana/assistant';
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Grid, Modal, useStyles2, Text } from '@grafana/ui';
|
||||
import { getModKey } from 'app/core/utils/browser';
|
||||
|
||||
const getShortcuts = (modKey: string) => {
|
||||
return [
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.global', 'Global'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ['g', 'h'],
|
||||
description: t('help-modal.shortcuts-description.go-to-home-dashboard', 'Go to Home Dashboard'),
|
||||
},
|
||||
{
|
||||
keys: ['g', 'd'],
|
||||
description: t('help-modal.shortcuts-description.go-to-dashboards', 'Go to Dashboards'),
|
||||
},
|
||||
{ keys: ['g', 'e'], description: t('help-modal.shortcuts-description.go-to-explore', 'Go to Explore') },
|
||||
{ keys: ['g', 'p'], description: t('help-modal.shortcuts-description.go-to-profile', 'Go to Profile') },
|
||||
{ keys: [`${modKey} + k`], description: t('help-modal.shortcuts-description.open-search', 'Open search') },
|
||||
{
|
||||
keys: ['esc'],
|
||||
description: t('help-modal.shortcuts-description.exit-edit/setting-views', 'Exit edit/setting views'),
|
||||
},
|
||||
{
|
||||
keys: ['?'],
|
||||
description: t('help-modal.shortcuts-description.show-all-shortcuts', 'Show all keyboard shortcuts'),
|
||||
},
|
||||
{ keys: ['c', 't'], description: t('help-modal.shortcuts-description.change-theme', 'Change theme') },
|
||||
],
|
||||
},
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.time-range', 'Time range'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ['t', 'z'],
|
||||
description: t('help-modal.shortcuts-description.zoom-out-time-range', 'Zoom out time range'),
|
||||
},
|
||||
{
|
||||
keys: ['t', '←'],
|
||||
description: t('help-modal.shortcuts-description.move-time-range-back', 'Move time range back'),
|
||||
},
|
||||
{
|
||||
keys: ['t', '→'],
|
||||
description: t('help-modal.shortcuts-description.move-time-range-forward', 'Move time range forward'),
|
||||
},
|
||||
{
|
||||
keys: ['t', 'a'],
|
||||
description: t(
|
||||
'help-modal.shortcuts-description.make-time-range-permanent',
|
||||
'Make time range absolute/permanent'
|
||||
),
|
||||
},
|
||||
{
|
||||
keys: ['t', 'c'],
|
||||
description: t('help-modal.shortcuts-description.copy-time-range', 'Copy time range'),
|
||||
},
|
||||
{
|
||||
keys: ['t', 'v'],
|
||||
description: t('help-modal.shortcuts-description.paste-time-range', 'Paste time range'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.dashboard', 'Dashboard'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: [`${modKey} + s`],
|
||||
description: t('help-modal.shortcuts-description.save-dashboard', 'Save dashboard'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'r'],
|
||||
description: t('help-modal.shortcuts-description.refresh-all-panels', 'Refresh all panels'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 's'],
|
||||
description: t('help-modal.shortcuts-description.dashboard-settings', 'Dashboard settings'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'v'],
|
||||
description: t('help-modal.shortcuts-description.toggle-active-mode', 'Toggle in-active / view mode'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'k'],
|
||||
description: t('help-modal.shortcuts-description.toggle-kiosk', 'Toggle kiosk mode (hides top nav)'),
|
||||
},
|
||||
{
|
||||
keys: ['d', '⇧ + e'],
|
||||
description: t('help-modal.shortcuts-description.expand-all-rows', 'Expand all rows'),
|
||||
},
|
||||
{
|
||||
keys: ['d', '⇧ + c'],
|
||||
description: t('help-modal.shortcuts-description.collapse-all-rows', 'Collapse all rows'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'a'],
|
||||
description: t(
|
||||
'help-modal.shortcuts-description.toggle-auto-fit',
|
||||
'Toggle auto fit panels (experimental feature)'
|
||||
),
|
||||
},
|
||||
{
|
||||
keys: [`${modKey} + o`],
|
||||
description: t('help-modal.shortcuts-description.toggle-graph-crosshair', 'Toggle shared graph crosshair'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'l'],
|
||||
description: t('help-modal.shortcuts-description.toggle-all-panel-legends', 'Toggle all panel legends'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'x'],
|
||||
description: t('help-modal.shortcuts-description.toggle-exemplars', 'Toggle exemplars in all panel'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.focused-panel', 'Focused panel'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ['e'],
|
||||
description: t('help-modal.shortcuts-description.toggle-panel-edit', 'Toggle panel edit view'),
|
||||
},
|
||||
{
|
||||
keys: ['v'],
|
||||
description: t('help-modal.shortcuts-description.toggle-panel-fullscreen', 'Toggle panel fullscreen view'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 'u'],
|
||||
description: t('help-modal.shortcuts-description.open-share-link-drawer', 'Share panel link'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 'e'],
|
||||
description: t('help-modal.shortcuts-description.open-share-embed-drawer', 'Share panel embed'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 's'],
|
||||
description: t('help-modal.shortcuts-description.open-shared-modal', 'Share panel snapshot'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 'x'],
|
||||
description: t('help-modal.shortcuts-description.explore-panel', 'Explore panel'),
|
||||
},
|
||||
{
|
||||
keys: ['i'],
|
||||
description: t('help-modal.shortcuts-description.inspect-panel', 'Inspect panel'),
|
||||
},
|
||||
{ keys: ['p', 'd'], description: t('help-modal.shortcuts-description.duplicate-panel', 'Duplicate Panel') },
|
||||
{ keys: ['p', 'r'], description: t('help-modal.shortcuts-description.remove-panel', 'Remove Panel') },
|
||||
{
|
||||
keys: ['p', 'l'],
|
||||
description: t('help-modal.shortcuts-description.toggle-panel-legend', 'Toggle panel legend'),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
export interface HelpModalProps {
|
||||
onDismiss: () => void;
|
||||
}
|
||||
|
||||
export const HelpModal = ({ onDismiss }: HelpModalProps): JSX.Element => {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
const modKey = useMemo(() => getModKey(), []);
|
||||
const shortcuts = useMemo(() => getShortcuts(modKey), [modKey]);
|
||||
const shortcuts = useShortcuts();
|
||||
return (
|
||||
<Modal title={t('help-modal.title', 'Shortcuts')} isOpen onDismiss={onDismiss} onClickBackdrop={onDismiss}>
|
||||
<Grid columns={{ xs: 1, sm: 2 }} gap={3} tabIndex={0}>
|
||||
@@ -213,6 +59,175 @@ export const HelpModal = ({ onDismiss }: HelpModalProps): JSX.Element => {
|
||||
);
|
||||
};
|
||||
|
||||
export const useShortcuts = () => {
|
||||
const { isAvailable: assistantAvailable } = useAssistant();
|
||||
const modKey = useMemo(() => getModKey(), []);
|
||||
|
||||
return useMemo(() => {
|
||||
const globalShortcuts = [
|
||||
{
|
||||
keys: ['g', 'h'],
|
||||
description: t('help-modal.shortcuts-description.go-to-home-dashboard', 'Go to Home Dashboard'),
|
||||
},
|
||||
{
|
||||
keys: ['g', 'd'],
|
||||
description: t('help-modal.shortcuts-description.go-to-dashboards', 'Go to Dashboards'),
|
||||
},
|
||||
{ keys: ['g', 'e'], description: t('help-modal.shortcuts-description.go-to-explore', 'Go to Explore') },
|
||||
{ keys: ['g', 'p'], description: t('help-modal.shortcuts-description.go-to-profile', 'Go to Profile') },
|
||||
{ keys: ['g', 'a'], description: t('help-modal.shortcuts-description.open-alerting', 'Go to Alerting') },
|
||||
{ keys: [`${modKey} + k`], description: t('help-modal.shortcuts-description.open-search', 'Open search') },
|
||||
{
|
||||
keys: ['esc'],
|
||||
description: t('help-modal.shortcuts-description.exit-edit/setting-views', 'Exit edit/setting views'),
|
||||
},
|
||||
{
|
||||
keys: ['?'],
|
||||
description: t('help-modal.shortcuts-description.show-all-shortcuts', 'Show all keyboard shortcuts'),
|
||||
},
|
||||
{ keys: ['c', 't'], description: t('help-modal.shortcuts-description.change-theme', 'Change theme') },
|
||||
];
|
||||
|
||||
// Add assistant shortcut only if assistant is available
|
||||
if (assistantAvailable) {
|
||||
globalShortcuts.push({
|
||||
keys: [`${modKey} + .`],
|
||||
description: t('help-modal.shortcuts-description.open-assistant', 'Open Assistant'),
|
||||
});
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.global', 'Global'),
|
||||
shortcuts: globalShortcuts,
|
||||
},
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.time-range', 'Time range'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ['t', 'z'],
|
||||
description: t('help-modal.shortcuts-description.zoom-out-time-range', 'Zoom out time range'),
|
||||
},
|
||||
{
|
||||
keys: ['t', '←'],
|
||||
description: t('help-modal.shortcuts-description.move-time-range-back', 'Move time range back'),
|
||||
},
|
||||
{
|
||||
keys: ['t', '→'],
|
||||
description: t('help-modal.shortcuts-description.move-time-range-forward', 'Move time range forward'),
|
||||
},
|
||||
{
|
||||
keys: ['t', 'a'],
|
||||
description: t(
|
||||
'help-modal.shortcuts-description.make-time-range-permanent',
|
||||
'Make time range absolute/permanent'
|
||||
),
|
||||
},
|
||||
{
|
||||
keys: ['t', 'c'],
|
||||
description: t('help-modal.shortcuts-description.copy-time-range', 'Copy time range'),
|
||||
},
|
||||
{
|
||||
keys: ['t', 'v'],
|
||||
description: t('help-modal.shortcuts-description.paste-time-range', 'Paste time range'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.dashboard', 'Dashboard'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: [`${modKey} + s`],
|
||||
description: t('help-modal.shortcuts-description.save-dashboard', 'Save dashboard'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'r'],
|
||||
description: t('help-modal.shortcuts-description.refresh-all-panels', 'Refresh all panels'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 's'],
|
||||
description: t('help-modal.shortcuts-description.dashboard-settings', 'Dashboard settings'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'v'],
|
||||
description: t('help-modal.shortcuts-description.toggle-active-mode', 'Toggle in-active / view mode'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'k'],
|
||||
description: t('help-modal.shortcuts-description.toggle-kiosk', 'Toggle kiosk mode (hides top nav)'),
|
||||
},
|
||||
{
|
||||
keys: ['d', '⇧ + e'],
|
||||
description: t('help-modal.shortcuts-description.expand-all-rows', 'Expand all rows'),
|
||||
},
|
||||
{
|
||||
keys: ['d', '⇧ + c'],
|
||||
description: t('help-modal.shortcuts-description.collapse-all-rows', 'Collapse all rows'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'a'],
|
||||
description: t(
|
||||
'help-modal.shortcuts-description.toggle-auto-fit',
|
||||
'Toggle auto fit panels (experimental feature)'
|
||||
),
|
||||
},
|
||||
{
|
||||
keys: [`${modKey} + o`],
|
||||
description: t('help-modal.shortcuts-description.toggle-graph-crosshair', 'Toggle shared graph crosshair'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'l'],
|
||||
description: t('help-modal.shortcuts-description.toggle-all-panel-legends', 'Toggle all panel legends'),
|
||||
},
|
||||
{
|
||||
keys: ['d', 'x'],
|
||||
description: t('help-modal.shortcuts-description.toggle-exemplars', 'Toggle exemplars in all panel'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
category: t('help-modal.shortcuts-category.focused-panel', 'Focused panel'),
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ['e'],
|
||||
description: t('help-modal.shortcuts-description.toggle-panel-edit', 'Toggle panel edit view'),
|
||||
},
|
||||
{
|
||||
keys: ['v'],
|
||||
description: t('help-modal.shortcuts-description.toggle-panel-fullscreen', 'Toggle panel fullscreen view'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 'u'],
|
||||
description: t('help-modal.shortcuts-description.open-share-link-drawer', 'Share panel link'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 'e'],
|
||||
description: t('help-modal.shortcuts-description.open-share-embed-drawer', 'Share panel embed'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 's'],
|
||||
description: t('help-modal.shortcuts-description.open-shared-modal', 'Share panel snapshot'),
|
||||
},
|
||||
{
|
||||
keys: ['p', 'x'],
|
||||
description: t('help-modal.shortcuts-description.explore-panel', 'Explore panel'),
|
||||
},
|
||||
{
|
||||
keys: ['i'],
|
||||
description: t('help-modal.shortcuts-description.inspect-panel', 'Inspect panel'),
|
||||
},
|
||||
{ keys: ['p', 'd'], description: t('help-modal.shortcuts-description.duplicate-panel', 'Duplicate Panel') },
|
||||
{ keys: ['p', 'r'], description: t('help-modal.shortcuts-description.remove-panel', 'Remove Panel') },
|
||||
{
|
||||
keys: ['p', 'l'],
|
||||
description: t('help-modal.shortcuts-description.toggle-panel-legend', 'Toggle panel legend'),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}, [modKey, assistantAvailable]);
|
||||
};
|
||||
|
||||
interface KeyProps {
|
||||
children: string;
|
||||
}
|
||||
|
||||
+3
-8
@@ -12,14 +12,10 @@ import {
|
||||
ViewInstrumentation,
|
||||
} from '@grafana/faro-web-sdk';
|
||||
import { TracingInstrumentation } from '@grafana/faro-web-tracing';
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
import { EchoSrvTransport } from './EchoSrvTransport';
|
||||
import {
|
||||
GrafanaJavascriptAgentBackend,
|
||||
GrafanaJavascriptAgentBackendOptions,
|
||||
TRACKING_URLS,
|
||||
} from './GrafanaJavascriptAgentBackend';
|
||||
import { GrafanaJavascriptAgentBackend, TRACKING_URLS } from './GrafanaJavascriptAgentBackend';
|
||||
import { GrafanaJavascriptAgentBackendOptions } from './types';
|
||||
|
||||
describe('GrafanaJavascriptAgentEchoBackend', () => {
|
||||
let mockedSetUser: jest.Mock;
|
||||
@@ -55,8 +51,6 @@ describe('GrafanaJavascriptAgentEchoBackend', () => {
|
||||
instrumentations: mockedInstrumentations,
|
||||
internalLogger: mockedInternalLogger,
|
||||
});
|
||||
|
||||
config.featureToggles.filterOutBotsFromFrontendLogs = false;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -90,6 +84,7 @@ describe('GrafanaJavascriptAgentEchoBackend', () => {
|
||||
buildInfo: buildInfo,
|
||||
userIdentifier: 'abc123',
|
||||
ignoreUrls: [],
|
||||
botFilterEnabled: false,
|
||||
};
|
||||
|
||||
it('will set up FetchTransport if customEndpoint is provided', () => {
|
||||
|
||||
+4
-20
@@ -1,5 +1,5 @@
|
||||
import { BuildInfo, escapeRegex } from '@grafana/data';
|
||||
import { BaseTransport, defaultInternalLoggerLevel, InternalLoggerLevel } from '@grafana/faro-core';
|
||||
import { escapeRegex } from '@grafana/data';
|
||||
import { BaseTransport, defaultInternalLoggerLevel } from '@grafana/faro-core';
|
||||
import {
|
||||
initializeFaro,
|
||||
BrowserConfig,
|
||||
@@ -12,7 +12,7 @@ import { EchoBackend, EchoEvent, EchoEventType } from '@grafana/runtime';
|
||||
|
||||
import { EchoSrvTransport } from './EchoSrvTransport';
|
||||
import { beforeSendHandler } from './beforeSendHandler';
|
||||
import { GrafanaJavascriptAgentEchoEvent } from './types';
|
||||
import { GrafanaJavascriptAgentBackendOptions, GrafanaJavascriptAgentEchoEvent } from './types';
|
||||
|
||||
function isCrossOriginIframe() {
|
||||
try {
|
||||
@@ -22,22 +22,6 @@ function isCrossOriginIframe() {
|
||||
}
|
||||
}
|
||||
|
||||
export interface GrafanaJavascriptAgentBackendOptions {
|
||||
apiKey?: string;
|
||||
customEndpoint?: string;
|
||||
internalLoggerLevel?: InternalLoggerLevel;
|
||||
|
||||
webVitalsAttribution: boolean;
|
||||
consoleInstrumentalizationEnabled: boolean;
|
||||
performanceInstrumentalizationEnabled: boolean;
|
||||
cspInstrumentalizationEnabled: boolean;
|
||||
tracingInstrumentalizationEnabled: boolean;
|
||||
|
||||
buildInfo: BuildInfo;
|
||||
userIdentifier: string;
|
||||
ignoreUrls: RegExp[];
|
||||
}
|
||||
|
||||
export const TRACKING_URLS = [
|
||||
/\.(google-analytics|googletagmanager)\.com/,
|
||||
/frontend-metrics/,
|
||||
@@ -107,7 +91,7 @@ export class GrafanaJavascriptAgentBackend
|
||||
batching: {
|
||||
sendTimeout: 1000,
|
||||
},
|
||||
beforeSend: beforeSendHandler,
|
||||
beforeSend: (item) => beforeSendHandler(options.botFilterEnabled, item),
|
||||
internalLoggerLevel: options.internalLoggerLevel ?? defaultInternalLoggerLevel,
|
||||
};
|
||||
|
||||
|
||||
+42
-33
@@ -1,5 +1,4 @@
|
||||
import { TransportItem, TransportItemType } from '@grafana/faro-core';
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
import { beforeSendHandler } from './beforeSendHandler';
|
||||
|
||||
@@ -11,43 +10,53 @@ const getTransportationItem = (userAgent: string | undefined): TransportItem =>
|
||||
|
||||
describe('beforeSendHandler', () => {
|
||||
beforeEach(() => {
|
||||
config.featureToggles.filterOutBotsFromFrontendLogs = false;
|
||||
jest.spyOn(console, 'warn').mockImplementation(() => {});
|
||||
});
|
||||
|
||||
it('should return item when feature toggle is disabled', () => {
|
||||
const botUserAgent = 'Googlebot/2.1 (+http://www.google.com/bot.html)';
|
||||
const item = getTransportationItem(botUserAgent);
|
||||
expect(beforeSendHandler(item)).toBe(item);
|
||||
describe('when botFilterEnabled is false', () => {
|
||||
it('should return item', () => {
|
||||
const botUserAgent = 'Googlebot/2.1 (+http://www.google.com/bot.html)';
|
||||
const item = getTransportationItem(botUserAgent);
|
||||
expect(beforeSendHandler(false, item)).toBe(item);
|
||||
});
|
||||
});
|
||||
|
||||
it('should return item for regular user agents', () => {
|
||||
config.featureToggles.filterOutBotsFromFrontendLogs = true;
|
||||
const regularUserAgent =
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36';
|
||||
const item = getTransportationItem(regularUserAgent);
|
||||
expect(beforeSendHandler(item)).toBe(item);
|
||||
});
|
||||
describe('when botFilterEnabled is true', () => {
|
||||
const userUserAgents = [
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36',
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
||||
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15',
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0',
|
||||
];
|
||||
const invalidUserAgents = ['', ' ', undefined, null, 0, 1, {}, [], () => {}];
|
||||
const maliciousUserAgents = userUserAgents.map((ua) => ua + 'a'.repeat(600));
|
||||
|
||||
it.each(['', undefined])('should return item when user agent is %s', (userAgent) => {
|
||||
config.featureToggles.filterOutBotsFromFrontendLogs = true;
|
||||
const item = getTransportationItem(userAgent);
|
||||
expect(beforeSendHandler(item)).toBe(item);
|
||||
});
|
||||
it.each(userUserAgents)('should return item for bot user agent: %s', (userAgent) => {
|
||||
const item = getTransportationItem(userAgent);
|
||||
expect(beforeSendHandler(true, item)).toBe(item);
|
||||
});
|
||||
|
||||
it.each([
|
||||
'Googlebot/2.1 (+http://www.google.com/bot.html)',
|
||||
'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)',
|
||||
'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)',
|
||||
'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)',
|
||||
'Twitterbot/1.0',
|
||||
'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)',
|
||||
'Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)',
|
||||
'Mozilla/5.0 (compatible; DuckDuckBot-Https/1.1; https://duckduckgo.com/duckduckbot)',
|
||||
'Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)',
|
||||
'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)',
|
||||
])('should return 0 for bot user agent: %s', (userAgent) => {
|
||||
config.featureToggles.filterOutBotsFromFrontendLogs = true;
|
||||
const item = getTransportationItem(userAgent);
|
||||
expect(beforeSendHandler(item)).toBe(null);
|
||||
it.each([
|
||||
...invalidUserAgents,
|
||||
...maliciousUserAgents,
|
||||
'Googlebot/2.1 (+http://www.google.com/bot.html)',
|
||||
'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)',
|
||||
'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)',
|
||||
'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)',
|
||||
'Twitterbot/1.0',
|
||||
'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)',
|
||||
'Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)',
|
||||
'Mozilla/5.0 (compatible; DuckDuckBot-Https/1.1; https://duckduckgo.com/duckduckbot)',
|
||||
'Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)',
|
||||
'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)',
|
||||
'Mozilla/5.0 (compatible; NOTgooglebot/2.1)',
|
||||
'Mozilla/5.0 (compatible; googlebotbypass/2.1)',
|
||||
'Mozilla/5.0 (compatible; notbingbot/2.0; +http://www.bing.com/notbingbot.htm)',
|
||||
])('should return null for bot user agent: %s', (userAgent) => {
|
||||
const item = getTransportationItem(userAgent as string);
|
||||
expect(beforeSendHandler(true, item)).toBe(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+42
-11
@@ -1,24 +1,55 @@
|
||||
import { TransportItem } from '@grafana/faro-core';
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
// as listed in https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/instrument/filter-bots/#filter-out-bots-from-collecting-data-for-frontend-observability
|
||||
const bots =
|
||||
'(googlebot|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)';
|
||||
'(googlebot|googlebot-mobile|googlebot-image|google favicon|mediapartners-google|' +
|
||||
'bingbot|slurp|commons-httpclient|python-urllib|libwww|httpunit|nutch|phpcrawl|' +
|
||||
'msnbot|jyxobot|fast-webcrawler|fast enterprise crawler|biglotron|teoma|convera|' +
|
||||
'seekbot|gigablast|exabot|ngbot|ia_archiver|gingercrawler|webmon |httrack|' +
|
||||
'webcrawler|grub.org|usinenouvellecrawler|antibot|netresearchserver|speedy|fluffy|' +
|
||||
'bibnum.bnf|findlink|msrbot|panscient|yacybot|aisearchbot|ioi|ips-agent|tagoobot|' +
|
||||
'mj12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|linguee bot|voyager|' +
|
||||
'cyberpatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|' +
|
||||
'scribdbot|page2rss|sitebot|linkdex|adidxbot|blekkobot|ezooms|mail.ru_bot|discobot|' +
|
||||
'heritrix|findthatfile|europarchive.org|nerdbynature.bot|sistrix crawler|ahrefsbot|' +
|
||||
'aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|' +
|
||||
'gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|retrevopageanalyzer|lb-spider|' +
|
||||
'sogou|lssbot|careerbot|wotbox|wocbot|ichiro|duckduckbot|lssrocketcrawler|drupact|' +
|
||||
'webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|' +
|
||||
'backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|' +
|
||||
'it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|' +
|
||||
'changedetection|blexbot|arabot|wesee:search|niki-bot|crystalsemanticsbot|rogerbot|' +
|
||||
'360spider|psbot|interfaxscanbot|lipperhey seo service|cc metadata scraper|g00g1e.net|' +
|
||||
'grapeshotcrawler|urlappendbot|brainobot|fr-crawler|binlar|simplecrawler|livelapbot|' +
|
||||
'twitterbot|cxensebot|smtbot|bnf.fr_bot|a6-indexer|admantx|facebot|orangebot|' +
|
||||
'memorybot|advbot|megaindex|semanticscholarbot|ltx71|nerdybot|xovibot|bubing|' +
|
||||
'qwantify|archive.org_bot|applebot|tweetmemebot|crawler4j|findxbot|semrushbot|' +
|
||||
'yoozbot|lipperhey|y!j-asr|domain re-animator bot|addthis)';
|
||||
|
||||
const botsRegex = new RegExp(bots, 'i');
|
||||
const botsRegex = new RegExp(bots);
|
||||
|
||||
export function beforeSendHandler(item: TransportItem): TransportItem | null {
|
||||
if (!config.featureToggles.filterOutBotsFromFrontendLogs) {
|
||||
export function beforeSendHandler(botFilterEnabled: boolean, item: TransportItem): TransportItem | null {
|
||||
if (!botFilterEnabled) {
|
||||
return item;
|
||||
}
|
||||
|
||||
if (!item.meta.browser?.userAgent) {
|
||||
return item;
|
||||
}
|
||||
|
||||
if (botsRegex.test(item.meta.browser.userAgent)) {
|
||||
if (typeof item.meta.browser?.userAgent !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return item;
|
||||
const userAgent = item.meta.browser?.userAgent?.trim().toLowerCase();
|
||||
if (!userAgent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (userAgent.length > 512) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const isBot = botsRegex.test(userAgent);
|
||||
return isBot ? null : item;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CurrentUserDTO } from '@grafana/data';
|
||||
import { BuildInfo, CurrentUserDTO } from '@grafana/data';
|
||||
import { InternalLoggerLevel } from '@grafana/faro-web-sdk';
|
||||
import { EchoEvent, EchoEventType } from '@grafana/runtime';
|
||||
|
||||
export interface BaseTransport {
|
||||
@@ -11,3 +12,20 @@ export interface User extends Pick<CurrentUserDTO, 'email'> {
|
||||
id: string;
|
||||
orgId?: number;
|
||||
}
|
||||
|
||||
export interface GrafanaJavascriptAgentBackendOptions {
|
||||
apiKey?: string;
|
||||
customEndpoint?: string;
|
||||
internalLoggerLevel?: InternalLoggerLevel;
|
||||
|
||||
webVitalsAttribution: boolean;
|
||||
consoleInstrumentalizationEnabled: boolean;
|
||||
performanceInstrumentalizationEnabled: boolean;
|
||||
cspInstrumentalizationEnabled: boolean;
|
||||
tracingInstrumentalizationEnabled: boolean;
|
||||
|
||||
buildInfo: BuildInfo;
|
||||
userIdentifier: string;
|
||||
ignoreUrls: RegExp[];
|
||||
botFilterEnabled: boolean;
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ async function initFaroBackend() {
|
||||
tracingInstrumentalizationEnabled: config.grafanaJavascriptAgent.tracingInstrumentalizationEnabled,
|
||||
webVitalsAttribution: config.grafanaJavascriptAgent.webVitalsAttribution,
|
||||
internalLoggerLevel: config.grafanaJavascriptAgent.internalLoggerLevel,
|
||||
botFilterEnabled: config.grafanaJavascriptAgent.botFilterEnabled,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { toggleAssistant, isAssistantAvailable } from '@grafana/assistant';
|
||||
import { LegacyGraphHoverClearEvent, SetPanelAttentionEvent, locationUtil } from '@grafana/data';
|
||||
import { LocationService } from '@grafana/runtime';
|
||||
import appEvents from 'app/core/app_events';
|
||||
@@ -38,6 +39,7 @@ export class KeybindingSrv {
|
||||
}
|
||||
/** string for VizPanel key and number for panelId */
|
||||
private panelId: string | number | null = null;
|
||||
private assistantSubscription: { unsubscribe: () => void } | null = null;
|
||||
|
||||
clearAndInitGlobalBindings(route: RouteDescriptor) {
|
||||
mousetrap.reset();
|
||||
@@ -51,6 +53,8 @@ export class KeybindingSrv {
|
||||
this.bind('g e', this.goToExplore);
|
||||
this.bind('g a', this.openAlerting);
|
||||
this.bind('g p', this.goToProfile);
|
||||
// Conditionally bind open Assistant shortcut ('o a') if Assistant is available
|
||||
this.bindAssistantShortcutIfAvailable();
|
||||
this.bind('esc', this.exit);
|
||||
this.bindGlobalEsc();
|
||||
}
|
||||
@@ -120,6 +124,30 @@ export class KeybindingSrv {
|
||||
appEvents.publish(new ShowModalReactEvent({ component: HelpModal }));
|
||||
}
|
||||
|
||||
private bindAssistantShortcutIfAvailable() {
|
||||
// Clean up any existing subscription
|
||||
if (this.assistantSubscription) {
|
||||
this.assistantSubscription.unsubscribe();
|
||||
}
|
||||
// Subscribe to assistant availability and bind/unbind shortcut accordingly
|
||||
this.assistantSubscription = isAssistantAvailable().subscribe((available) => {
|
||||
if (available) {
|
||||
this.bind('mod+.', this.toggleAssistant);
|
||||
} else {
|
||||
// Unbind the shortcut if assistant becomes unavailable
|
||||
mousetrap.unbind('mod+.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private toggleAssistant() {
|
||||
toggleAssistant({
|
||||
origin: 'grafana/keyboard-shortcut',
|
||||
prompt: '',
|
||||
context: [],
|
||||
});
|
||||
}
|
||||
|
||||
private exit() {
|
||||
const search = this.locationService.getSearchObject();
|
||||
|
||||
|
||||
@@ -18,7 +18,10 @@ import { LogLineVirtualization } from './virtualization';
|
||||
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn(() => [true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
openAssistant: jest.fn(),
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('./LogListContext');
|
||||
|
||||
@@ -14,7 +14,10 @@ import { DEFAULT_TIME_WINDOW, LogLineContext, PAGE_SIZE } from './LogLineContext
|
||||
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn(() => [true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
openAssistant: jest.fn(),
|
||||
}),
|
||||
}));
|
||||
|
||||
const dfBefore = createDataFrame({
|
||||
|
||||
@@ -30,7 +30,10 @@ import { defaultValue } from './__mocks__/LogListContext';
|
||||
jest.mock('@grafana/assistant', () => {
|
||||
return {
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn().mockReturnValue([true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
openAssistant: jest.fn(),
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,10 @@ jest.mock('./LogListContext');
|
||||
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn(() => [true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
openAssistant: jest.fn(),
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('@grafana/runtime', () => ({
|
||||
|
||||
@@ -21,7 +21,9 @@ import { LogList, Props } from './LogList';
|
||||
|
||||
jest.mock('@grafana/assistant', () => ({
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn(() => [true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('@grafana/runtime', () => {
|
||||
|
||||
@@ -265,7 +265,7 @@ export const LogListContextProvider = ({
|
||||
const [detailsMode, setDetailsMode] = useState<LogLineDetailsMode>(
|
||||
detailsModeProp ?? getDefaultDetailsMode(containerElement)
|
||||
);
|
||||
const [isAssistantAvailable, openAssistant] = useAssistant();
|
||||
const { isAvailable: isAssistantAvailable, openAssistant } = useAssistant();
|
||||
const [prettifyJSON, setPrettifyJSONState] = useState(prettifyJSONProp);
|
||||
const [wrapLogMessage, setWrapLogMessageState] = useState(wrapLogMessageProp);
|
||||
|
||||
|
||||
@@ -49,7 +49,9 @@ jest.mock('../../utils', () => ({
|
||||
jest.mock('@grafana/assistant', () => {
|
||||
return {
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn().mockReturnValue([true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ import { LogListModel } from '../processing';
|
||||
jest.mock('@grafana/assistant', () => {
|
||||
return {
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn().mockReturnValue([true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({
|
||||
isAvailable: true,
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"webpack": "5.101.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@grafana/assistant": "^0.0.17 || ^0.0.18",
|
||||
"@grafana/assistant": "^0.1.0",
|
||||
"@grafana/runtime": "*"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -61,7 +61,7 @@ jest.mock('@grafana/data', () => ({
|
||||
jest.mock('@grafana/assistant', () => {
|
||||
return {
|
||||
...jest.requireActual('@grafana/assistant'),
|
||||
useAssistant: jest.fn().mockReturnValue([true, jest.fn()]),
|
||||
useAssistant: jest.fn().mockReturnValue({ isAvailable: true }),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -9097,6 +9097,8 @@
|
||||
"make-time-range-permanent": "Make time range absolute/permanent",
|
||||
"move-time-range-back": "Move time range back",
|
||||
"move-time-range-forward": "Move time range forward",
|
||||
"open-alerting": "Go to Alerting",
|
||||
"open-assistant": "Open Assistant",
|
||||
"open-search": "Open search",
|
||||
"open-share-embed-drawer": "Share panel embed",
|
||||
"open-share-link-drawer": "Share panel link",
|
||||
|
||||
@@ -2536,7 +2536,7 @@ __metadata:
|
||||
typescript: "npm:5.9.2"
|
||||
webpack: "npm:5.101.0"
|
||||
peerDependencies:
|
||||
"@grafana/assistant": ^0.0.17 || ^0.0.18
|
||||
"@grafana/assistant": ^0.1.0
|
||||
"@grafana/runtime": "*"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -2993,9 +2993,9 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@grafana/assistant@npm:0.0.18":
|
||||
version: 0.0.18
|
||||
resolution: "@grafana/assistant@npm:0.0.18"
|
||||
"@grafana/assistant@npm:0.1.0":
|
||||
version: 0.1.0
|
||||
resolution: "@grafana/assistant@npm:0.1.0"
|
||||
peerDependencies:
|
||||
"@grafana/data": ">=12.1.0"
|
||||
"@grafana/runtime": ">=12.1.0"
|
||||
@@ -3003,7 +3003,7 @@ __metadata:
|
||||
"@grafana/ui": ">=12.1.0"
|
||||
react: ">=18.0.0"
|
||||
rxjs: ">=7.0.0"
|
||||
checksum: 10/6e95f6e7026121f220a20064aa1fc715cf969d93e02b506268dd589d4400b399a6e7d1f2a1a69edb973b604be932c7b091deee1960f90eccf8ea53b67314438e
|
||||
checksum: 10/90cfee9860bc128190ec1357e554685892b3ddd080d914457da311f1d45294dfcc15a427be36c381463eefe39268b5abbc39e6b541ad402e78264cc6d038c23f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3223,7 +3223,7 @@ __metadata:
|
||||
tslib: "npm:2.8.1"
|
||||
typescript: "npm:5.9.2"
|
||||
peerDependencies:
|
||||
"@grafana/assistant": ^0.0.17 || ^0.0.18
|
||||
"@grafana/assistant": ^0.1.0
|
||||
react: ^18.0.0
|
||||
react-dom: ^18.0.0
|
||||
languageName: unknown
|
||||
@@ -5758,9 +5758,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@openfeature/core@npm:^1.9.0":
|
||||
version: 1.9.0
|
||||
resolution: "@openfeature/core@npm:1.9.0"
|
||||
checksum: 10/c6d20edc09053afd99752fe46d8328158680950bca4b86679f67f79249d7226eea127b31fffdc38e26ecb729f2bab5a4a5a7c1db708ae76b7fbbac68cd56f094
|
||||
version: 1.9.1
|
||||
resolution: "@openfeature/core@npm:1.9.1"
|
||||
checksum: 10/6099e16b1b4cd6e3c45c05ab4acd44c9cb4ab501b676ab6f3e77f0be1b56abc7506c5629187381333a02975d315d831e0905582435b356d9676255e72a465899
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -5785,11 +5785,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@openfeature/web-sdk@npm:^1.6.1":
|
||||
version: 1.6.1
|
||||
resolution: "@openfeature/web-sdk@npm:1.6.1"
|
||||
version: 1.6.2
|
||||
resolution: "@openfeature/web-sdk@npm:1.6.2"
|
||||
peerDependencies:
|
||||
"@openfeature/core": ^1.9.0
|
||||
checksum: 10/8bd7d1ea386e21cdd7492cab2fd1d2b138b4e6a376a4c0a40244633e5955f6452039bc2633fc5230bd7b494506a4137ba7210d40850634f9618f77a0ee435f9d
|
||||
checksum: 10/0fcc0ef76ff51d4725a00ff07755b21941b647f775d1ff04fc3d973143e78c909ccba485f582fcbc7f6201f42c795c85bcb103c43d64924fedf13ea517f625ac
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -18277,7 +18277,7 @@ __metadata:
|
||||
"@formatjs/intl-durationformat": "npm:^0.7.0"
|
||||
"@glideapps/glide-data-grid": "npm:^6.0.0"
|
||||
"@grafana/alerting": "workspace:*"
|
||||
"@grafana/assistant": "npm:0.0.18"
|
||||
"@grafana/assistant": "npm:0.1.0"
|
||||
"@grafana/aws-sdk": "npm:0.7.1"
|
||||
"@grafana/azure-sdk": "npm:0.0.7"
|
||||
"@grafana/data": "workspace:*"
|
||||
@@ -23573,11 +23573,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"nanoid@npm:^5.0.9":
|
||||
version: 5.1.5
|
||||
resolution: "nanoid@npm:5.1.5"
|
||||
version: 5.1.6
|
||||
resolution: "nanoid@npm:5.1.6"
|
||||
bin:
|
||||
nanoid: bin/nanoid.js
|
||||
checksum: 10/6de2d006b51c983be385ef7ee285f7f2a57bd96f8c0ca881c4111461644bd81fafc2544f8e07cb834ca0f3e0f3f676c1fe78052183f008b0809efe6e273119f5
|
||||
checksum: 10/4109dbcf596d7f297a9b42f459b8f01694a03ebbdd2f41408d963ad54e5ec7234cbe7b4acad137751f31add11bb4fb3415a3e688082516745812811f05570014
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -28997,7 +28997,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:7.7.2, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.0, semver@npm:^7.7.1, semver@npm:^7.7.2, semver@npm:~7.7.1":
|
||||
"semver@npm:7.7.2":
|
||||
version: 7.7.2
|
||||
resolution: "semver@npm:7.7.2"
|
||||
bin:
|
||||
@@ -29015,6 +29015,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.0, semver@npm:^7.7.1, semver@npm:^7.7.2, semver@npm:~7.7.1":
|
||||
version: 7.7.3
|
||||
resolution: "semver@npm:7.7.3"
|
||||
bin:
|
||||
semver: bin/semver.js
|
||||
checksum: 10/8dbc3168e057a38fc322af909c7f5617483c50caddba135439ff09a754b20bdd6482a5123ff543dad4affa488ecf46ec5fb56d61312ad20bb140199b88dfaea9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"send@npm:^1.1.0, send@npm:^1.2.0":
|
||||
version: 1.2.0
|
||||
resolution: "send@npm:1.2.0"
|
||||
|
||||
Reference in New Issue
Block a user