blob: bec1069beab3bec78cb8d923c200e3f419d64b59 [file] [log] [blame]
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//third_party/protobuf/proto_library.gni")
import("//third_party/cobalt_config/metrics_registry.gni")
metrics_registry("internal_metrics_config") {
customer_id = 2147483647
project_name = "metrics"
namespace = "cobalt.logger"
generate_binarypb = false
generate_cc = true
}
proto_library("cobalt_local_aggregation_proto") {
proto_in_dir = "//third_party/cobalt"
sources = [
"local_aggregation.proto",
]
import_dirs = [ "//third_party/protobuf/src" ]
generate_python = false
cc_generator_options = "lite"
deps = [
"//third_party/cobalt/config:cobalt_registry_proto",
]
extra_configs = [
"//third_party/cobalt:cobalt_config",
"//third_party/cobalt/config:proto_config",
]
}
source_set("status") {
sources = [
"status.h",
]
}
source_set("event_record") {
sources = [
"event_record.h",
]
public_configs = [
"//third_party/cobalt:cobalt_config",
"//third_party/cobalt/config:proto_config",
]
public_deps = [
"//third_party/cobalt:cobalt_proto",
"//third_party/cobalt/config:cobalt_registry_proto",
]
}
source_set("project_context") {
sources = [
"project_context.cc",
"project_context.h",
]
public_configs = [
"//third_party/cobalt:cobalt_config",
"//third_party/cobalt/config:proto_config",
]
public_deps = [
":status",
"//garnet/public/lib/fxl",
"//third_party/cobalt/config:cobalt_registry_proto",
"//third_party/cobalt/config:project_configs",
]
}
source_set("project_context_factory") {
sources = [
"project_context_factory.cc",
"project_context_factory.h",
]
public_configs = [
"//third_party/cobalt:cobalt_config",
"//third_party/cobalt/config:proto_config",
]
deps = [
"//third_party/cobalt/config:cobalt_registry_proto",
]
public_deps = [
":project_context",
"//third_party/cobalt/encoder:legacy_project_context",
]
}
source_set("encoder") {
sources = [
"encoder.cc",
"encoder.h",
]
public_configs = [ "//third_party/cobalt:cobalt_config" ]
public_deps = [
":status",
"//garnet/public/lib/fxl",
"//third_party/abseil-cpp",
"//third_party/cobalt/config:cobalt_registry_proto",
"//third_party/cobalt/encoder",
"//third_party/cobalt/util/crypto_util",
]
}
source_set("observation_writer") {
sources = [
"observation_writer.cc",
"observation_writer.h",
]
public_configs = [ "//third_party/cobalt:cobalt_config" ]
public_deps = [
":status",
"//garnet/public/lib/fxl",
"//third_party/cobalt:cobalt_proto",
"//third_party/cobalt/encoder",
"//third_party/cobalt/util:encrypted_message_util",
]
}
source_set("event_aggregator") {
sources = [
"event_aggregator.cc",
"event_aggregator.h",
]
public_configs = [
"//third_party/cobalt:cobalt_config",
"//third_party/cobalt/config:proto_config",
]
public_deps = [
":cobalt_local_aggregation_proto",
":encoder",
":event_record",
":observation_writer",
":status",
"//garnet/public/lib/fxl",
"//third_party/cobalt/algorithms/rappor:rappor_encoder",
"//third_party/cobalt:cobalt_proto",
"//third_party/cobalt/config:cobalt_registry_proto",
"//third_party/cobalt/util:consistent_proto_store",
"//third_party/cobalt/util:proto_util",
]
}
source_set("logger_interface") {
sources = [
"logger_interface.h",
]
public_configs = [ "//third_party/cobalt:cobalt_config" ]
public_deps = [
":encoder",
":status",
]
}
source_set("internal_metrics") {
sources = [
"internal_metrics.cc",
"internal_metrics.h",
]
public_configs = [ "//third_party/cobalt:cobalt_config" ]
public_deps = [
":internal_metrics_config_cc",
":logger_interface",
"//garnet/public/lib/fxl",
]
}
source_set("logger") {
sources = [
"logger.cc",
"logger.h",
]
public_configs = [ "//third_party/cobalt:cobalt_config" ]
public_deps = [
":encoder",
":event_aggregator",
":event_record",
":internal_metrics",
":logger_interface",
":observation_writer",
# TODO(rudominer) Remove :project_context from public_deps after
# Fuchsia code switches to ProjectContextFactory.
":project_context",
":status",
"//third_party/cobalt/config:id",
]
}