|
| 1 | +// Copyright 2018, OpenCensus Authors |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +// NOTE: This proto is experimental and is subject to change at this point. |
| 18 | +// Please do not use it at the moment. |
| 19 | + |
| 20 | +package opencensus.proto.agent.common.v1; |
| 21 | + |
| 22 | +import "google/protobuf/timestamp.proto"; |
| 23 | + |
| 24 | +option java_multiple_files = true; |
| 25 | +option java_package = "io.opencensus.proto.agent.common.v1"; |
| 26 | +option java_outer_classname = "CommonProto"; |
| 27 | + |
| 28 | +option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/agentproto/commonproto/v1"; |
| 29 | + |
| 30 | +// Identifier metadata of the Node that connects to OpenCensus Agent. |
| 31 | +// In the future we plan to extend the identifier proto definition to support |
| 32 | +// additional information (e.g cloud id, monitored resource, etc.) |
| 33 | +message Node { |
| 34 | + // Identifier that uniquely identifies a process within a VM/container. |
| 35 | + ProcessIdentifier identifier = 1; |
| 36 | + |
| 37 | + // Information on the OpenCensus Library who initiates the stream. |
| 38 | + LibraryInfo library_info = 2; |
| 39 | + |
| 40 | + // Additional informantion on service. |
| 41 | + ServiceInfo service_info = 3; |
| 42 | + |
| 43 | + // Additional attributes. |
| 44 | + map<string, string> attributes = 4; |
| 45 | + |
| 46 | + // TODO(songya): Add more identifiers in the future as needed, like cloud |
| 47 | + // identifiers. |
| 48 | +} |
| 49 | + |
| 50 | +// Identifier that uniquely identifies a process within a VM/container. |
| 51 | +message ProcessIdentifier { |
| 52 | + |
| 53 | + // The host name. Usually refers to the machine/container name. |
| 54 | + // For example: os.Hostname() in Go, socket.gethostname() in Python. |
| 55 | + string host_name = 1; |
| 56 | + |
| 57 | + // Process id. |
| 58 | + uint32 pid = 2; |
| 59 | + |
| 60 | + // Start time of this ProcessIdentifier. Represented in epoch time. |
| 61 | + google.protobuf.Timestamp start_timestamp = 3; |
| 62 | + |
| 63 | + // TODO(songya): Add more fields in the future as needed. |
| 64 | +} |
| 65 | + |
| 66 | +// Information on OpenCensus Library. |
| 67 | +message LibraryInfo { |
| 68 | + |
| 69 | + enum Language { |
| 70 | + LANGUAGE_UNSPECIFIED = 0; |
| 71 | + CPP = 1; |
| 72 | + C_SHARP = 2; |
| 73 | + ERLANG = 3; |
| 74 | + GO_LANG = 4; |
| 75 | + JAVA = 5; |
| 76 | + NODE_JS = 6; |
| 77 | + PHP = 7; |
| 78 | + PYTHON = 8; |
| 79 | + RUBY = 9; |
| 80 | + } |
| 81 | + |
| 82 | + // Language of OpenCensus Library. |
| 83 | + Language language = 1; |
| 84 | + |
| 85 | + // Version of Agent exporter of Library. |
| 86 | + string version = 2; |
| 87 | +} |
| 88 | + |
| 89 | +// Additional service information. |
| 90 | +message ServiceInfo { |
| 91 | + |
| 92 | + // Name of the service. |
| 93 | + string name = 1; |
| 94 | + |
| 95 | + // TODO(songya): add more fields as needed. |
| 96 | +} |
0 commit comments