test/plugin/constants.rb in fluent-plugin-google-cloud-0.7.15 vs test/plugin/constants.rb in fluent-plugin-google-cloud-0.7.16
- old
+ new
@@ -462,10 +462,57 @@
CONFIG_LABLES_AND_LABLE_MAP_CONFLICTING = %(
#{CONFIG_LABELS_CONFLICTING}
#{CONFIG_LABEL_MAP_CONFLICTING}
).freeze
+ # For monitoring config.
+ CONFIG_UNKNOWN_MONITORING_TYPE = %(
+ enable_monitoring true
+ monitoring_type not_prometheus
+ ).freeze
+
+ # For statusz.
+ CONFIG_STATUSZ = %(
+ statusz_port 5678
+
+ adjust_invalid_timestamps false
+ autoformat_stackdriver_trace false
+ coerce_to_utf8 false
+ detect_json true
+ detect_subservice false
+ enable_metadata_agent true
+ enable_monitoring true
+ http_request_key test_http_request_key
+ insert_id_key test_insert_id_key
+ k8s_cluster_location test-k8s-cluster-location
+ k8s_cluster_name test-k8s-cluster-name
+ kubernetes_tag_regexp .*test-regexp.*
+ label_map { "label_map_key": "label_map_value" }
+ labels_key test_labels_key
+ labels { "labels_key": "labels_value" }
+ logging_api_url http://localhost:52000
+ metadata_agent_url http://localhost:12345
+ monitoring_type not_prometheus
+ non_utf8_replacement_string zzz
+ operation_key test_operation_key
+ partial_success false
+ project_id test-project-id-123
+ require_valid_tags true
+ source_location_key test_source_location_key
+ span_id_key test_span_id_key
+ split_logs_by_tag true
+ subservice_name test_subservice_name
+ trace_key test_trace_key
+ trace_sampled_key test_trace_sampled_key
+ use_aws_availability_zone false
+ use_grpc true
+ use_metadata_service false
+ vm_id 12345
+ vm_name test.hostname.org
+ zone asia-east2
+ ).freeze
+
# Service configurations for various services.
# GCE.
COMPUTE_PARAMS_NO_LOG_NAME = {
resource: {
@@ -796,36 +843,36 @@
)
)
).freeze
HTTP_REQUEST_MESSAGE = {
- 'cacheFillBytes' => 6653,
+ 'cacheFillBytes' => '6653',
'cacheHit' => true,
'cacheLookup' => true,
'cacheValidatedWithOriginServer' => true,
'protocol' => 'HTTP/1.1',
'referer' => 'http://referer/',
'remoteIp' => '55.55.55.55',
- 'responseSize' => 65,
+ 'responseSize' => '65',
'requestMethod' => 'POST',
- 'requestSize' => 210,
+ 'requestSize' => '210',
'requestUrl' => 'http://example/',
'serverIp' => '66.66.66.66',
'status' => 200,
'userAgent' => 'USER AGENT 1.0'
}.freeze
SOURCE_LOCATION_MESSAGE = {
'file' => 'source/file',
'function' => 'my_function',
- 'line' => 18
+ 'line' => '18'
}.freeze
SOURCE_LOCATION_MESSAGE2 = {
'file' => 'src/file',
'function' => 'my_func',
- 'line' => 8
+ 'line' => '8'
}.freeze
OPERATION_MESSAGE = {
'id' => 'op_id',
'producer' => 'my/app',
@@ -1054,11 +1101,29 @@
'google.rpc.debuginfo-bin' => debug_info.to_proto,
'grpc-status-details-bin' => status_details.to_proto
}.freeze
end
+ PRESERVED_KEYS_TIMESTAMP_FIELDS = [
+ {
+ 'time' => K8S_TIMESTAMP
+ },
+ {
+ 'timeNanos' => K8S_NANOS
+ },
+ {
+ 'timestamp' => {
+ 'nanos' => K8S_NANOS,
+ 'seconds' => K8S_SECONDS_EPOCH
+ }
+ },
+ {
+ 'timestampNanos' => K8S_NANOS,
+ 'timestampSeconds' => K8S_SECONDS_EPOCH
+ }
+ ].freeze
+
PRESERVED_KEYS_MAP = {
- 'time' => K8S_TIMESTAMP,
'severity' => CONTAINER_SEVERITY,
DEFAULT_HTTP_REQUEST_KEY => HTTP_REQUEST_MESSAGE,
DEFAULT_INSERT_ID_KEY => INSERT_ID,
DEFAULT_LABELS_KEY => LABELS_MESSAGE,
DEFAULT_OPERATION_KEY => OPERATION_MESSAGE,