blob: d439c24688f57aa87b8452a15ec3967587e1c3ac [file] [log] [blame]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
syntax = "proto2";
package heron.proto.system;
option java_package = "org.apache.heron.proto.system";
option java_outer_classname = "Metrics";
import "common.proto";
import "tmaster.proto";
// This file defines the various protocol buffers needed
// for sending metrics from all the system components(workers,
// (stmgrs, tmasters). The components first register themselves
// with MetricPublisherRegisterRequest. And then everytime
// they want to send a metric, they use the
// MetricPublisherPublishMessage to send out the actual message
message MetricDatum {
required string name = 1;
required string value = 2;
}
message ExceptionData {
// Stack trace of exception. First two lines of stack trace is used for aggregating exception.
required string stacktrace = 1;
// Last time the exception occurred in the metrics collection interval
required string lasttime = 2;
// First time the exception occurred in the metrics collection interval
required string firsttime = 3;
// Number of time exception occurred in the metrics collection interval
required int32 count = 4;
// Additional text logged.
required string logging = 5;
}
message MetricPublisher {
required string hostname = 1;
required int32 port = 2;
// like Tail-FlatMap or __stmgr__
required string component_name = 3;
// In case of regular instances, it is their instance_id
// For stmgr, it is the stmgr id
required string instance_id = 4;
// The index of the instance with respect
// to that component_name
required int32 instance_index = 5;
}
message MetricPublisherRegisterRequest {
required MetricPublisher publisher = 1;
}
message MetricPublisherRegisterResponse {
required Status status = 1;
}
message MetricPublisherPublishMessage {
repeated MetricDatum metrics = 1;
repeated ExceptionData exceptions = 2;
}
// This is the tmaster location refresh message sent
// by the stmgrs to the metricsmgrs
message TMasterLocationRefreshMessage {
required heron.proto.tmaster.TMasterLocation tmaster = 1;
}
message MetricsCacheLocationRefreshMessage {
required heron.proto.tmaster.MetricsCacheLocation metricscache = 1;
}