loggregator_emitter 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/loggregator_emitter/emit.rb +1 -2
- data/lib/sonde.rb +7 -0
- data/lib/sonde/envelope.pb.rb +38 -0
- data/lib/sonde/error.pb.rb +15 -0
- data/lib/sonde/http.pb.rb +110 -0
- data/lib/sonde/log.pb.rb +23 -0
- data/lib/sonde/metric.pb.rb +37 -0
- data/lib/sonde/sonde_extender.rb +0 -2
- data/lib/sonde/uuid.pb.rb +14 -0
- data/loggregator_emitter.gemspec +1 -1
- data/spec/support/fake_loggregator_server.rb +1 -2
- metadata +9 -4
- data/lib/sonde/sonde.pb.rb +0 -42
- data/lib/sonde/sonde.proto +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d1ef9bf97fbc5930c29130a377344fa40b1264b
|
4
|
+
data.tar.gz: 9fd666bb99d2120fa012cb2f372e17a8f335de35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 800c01ae3b281d7738fac0c5473a3f28a15d9a7c9cf4a52a6b2d4381888e116c4532c1ea9786e1e02cc52f421e24a282ebcba8b29755dd426e232ed9c83da7e6
|
7
|
+
data.tar.gz: 80df9ff95e024d76be537843d3c70cf725b8366ca6c64ff02a5396ab698bc8385a1e571c11724d8790c1d6cef47af21b4ef6c1eef8151f8708c90bad0059f0fa
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ Call emit() or emit_error() on this emitter with the application GUID and the me
|
|
39
39
|
|
40
40
|
### Regenerating Protobuf library
|
41
41
|
|
42
|
-
BEEFCAKE_NAMESPACE=Sonde protoc --beefcake_out lib/sonde -I
|
42
|
+
BEEFCAKE_NAMESPACE=Sonde protoc --beefcake_out lib/sonde -I ~/workspace/cf-release/src/loggregator/src/github.com/cloudfoundry/sonde-go/definitions/events ~/workspace/cf-release/src/loggregator/src/github.com/cloudfoundry/sonde-go/definitions/events/envelope.proto
|
43
43
|
|
44
44
|
### Versioning
|
45
45
|
|
data/lib/sonde.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
## Generated from envelope.proto for events
|
2
|
+
require "beefcake"
|
3
|
+
|
4
|
+
module Sonde
|
5
|
+
|
6
|
+
class Envelope
|
7
|
+
include Beefcake::Message
|
8
|
+
|
9
|
+
module EventType
|
10
|
+
HttpStart = 2
|
11
|
+
HttpStop = 3
|
12
|
+
HttpStartStop = 4
|
13
|
+
LogMessage = 5
|
14
|
+
ValueMetric = 6
|
15
|
+
CounterEvent = 7
|
16
|
+
Error = 8
|
17
|
+
ContainerMetric = 9
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class Envelope
|
22
|
+
required :origin, :string, 1
|
23
|
+
required :eventType, Envelope::EventType, 2
|
24
|
+
optional :timestamp, :int64, 6
|
25
|
+
optional :deployment, :string, 13
|
26
|
+
optional :job, :string, 14
|
27
|
+
optional :index, :string, 15
|
28
|
+
optional :ip, :string, 16
|
29
|
+
optional :httpStart, HttpStart, 4
|
30
|
+
optional :httpStop, HttpStop, 5
|
31
|
+
optional :httpStartStop, HttpStartStop, 7
|
32
|
+
optional :logMessage, LogMessage, 8
|
33
|
+
optional :valueMetric, ValueMetric, 9
|
34
|
+
optional :counterEvent, CounterEvent, 10
|
35
|
+
optional :error, Error, 11
|
36
|
+
optional :containerMetric, ContainerMetric, 12
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
## Generated from error.proto for events
|
2
|
+
require "beefcake"
|
3
|
+
|
4
|
+
module Sonde
|
5
|
+
|
6
|
+
class Error
|
7
|
+
include Beefcake::Message
|
8
|
+
end
|
9
|
+
|
10
|
+
class Error
|
11
|
+
required :source, :string, 1
|
12
|
+
required :code, :int32, 2
|
13
|
+
required :message, :string, 3
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
## Generated from http.proto for events
|
2
|
+
require "beefcake"
|
3
|
+
|
4
|
+
module Sonde
|
5
|
+
|
6
|
+
module PeerType
|
7
|
+
Client = 1
|
8
|
+
Server = 2
|
9
|
+
end
|
10
|
+
|
11
|
+
module Method
|
12
|
+
GET = 1
|
13
|
+
POST = 2
|
14
|
+
PUT = 3
|
15
|
+
DELETE = 4
|
16
|
+
HEAD = 5
|
17
|
+
ACL = 6
|
18
|
+
BASELINE_CONTROL = 7
|
19
|
+
BIND = 8
|
20
|
+
CHECKIN = 9
|
21
|
+
CHECKOUT = 10
|
22
|
+
CONNECT = 11
|
23
|
+
COPY = 12
|
24
|
+
DEBUG = 13
|
25
|
+
LABEL = 14
|
26
|
+
LINK = 15
|
27
|
+
LOCK = 16
|
28
|
+
MERGE = 17
|
29
|
+
MKACTIVITY = 18
|
30
|
+
MKCALENDAR = 19
|
31
|
+
MKCOL = 20
|
32
|
+
MKREDIRECTREF = 21
|
33
|
+
MKWORKSPACE = 22
|
34
|
+
MOVE = 23
|
35
|
+
OPTIONS = 24
|
36
|
+
ORDERPATCH = 25
|
37
|
+
PATCH = 26
|
38
|
+
PRI = 27
|
39
|
+
PROPFIND = 28
|
40
|
+
PROPPATCH = 29
|
41
|
+
REBIND = 30
|
42
|
+
REPORT = 31
|
43
|
+
SEARCH = 32
|
44
|
+
SHOWMETHOD = 33
|
45
|
+
SPACEJUMP = 34
|
46
|
+
TEXTSEARCH = 35
|
47
|
+
TRACE = 36
|
48
|
+
TRACK = 37
|
49
|
+
UNBIND = 38
|
50
|
+
UNCHECKOUT = 39
|
51
|
+
UNLINK = 40
|
52
|
+
UNLOCK = 41
|
53
|
+
UPDATE = 42
|
54
|
+
UPDATEREDIRECTREF = 43
|
55
|
+
VERSION_CONTROL = 44
|
56
|
+
end
|
57
|
+
|
58
|
+
class HttpStart
|
59
|
+
include Beefcake::Message
|
60
|
+
end
|
61
|
+
|
62
|
+
class HttpStop
|
63
|
+
include Beefcake::Message
|
64
|
+
end
|
65
|
+
|
66
|
+
class HttpStartStop
|
67
|
+
include Beefcake::Message
|
68
|
+
end
|
69
|
+
|
70
|
+
class HttpStart
|
71
|
+
required :timestamp, :int64, 1
|
72
|
+
required :requestId, UUID, 2
|
73
|
+
required :peerType, PeerType, 3
|
74
|
+
required :method, Method, 4
|
75
|
+
required :uri, :string, 5
|
76
|
+
required :remoteAddress, :string, 6
|
77
|
+
required :userAgent, :string, 7
|
78
|
+
optional :parentRequestId, UUID, 8
|
79
|
+
optional :applicationId, UUID, 9
|
80
|
+
optional :instanceIndex, :int32, 10
|
81
|
+
optional :instanceId, :string, 11
|
82
|
+
end
|
83
|
+
|
84
|
+
class HttpStop
|
85
|
+
required :timestamp, :int64, 1
|
86
|
+
required :uri, :string, 2
|
87
|
+
required :requestId, UUID, 3
|
88
|
+
required :peerType, PeerType, 4
|
89
|
+
required :statusCode, :int32, 5
|
90
|
+
required :contentLength, :int64, 6
|
91
|
+
optional :applicationId, UUID, 7
|
92
|
+
end
|
93
|
+
|
94
|
+
class HttpStartStop
|
95
|
+
required :startTimestamp, :int64, 1
|
96
|
+
required :stopTimestamp, :int64, 2
|
97
|
+
required :requestId, UUID, 3
|
98
|
+
required :peerType, PeerType, 4
|
99
|
+
required :method, Method, 5
|
100
|
+
required :uri, :string, 6
|
101
|
+
required :remoteAddress, :string, 7
|
102
|
+
required :userAgent, :string, 8
|
103
|
+
required :statusCode, :int32, 9
|
104
|
+
required :contentLength, :int64, 10
|
105
|
+
optional :parentRequestId, UUID, 11
|
106
|
+
optional :applicationId, UUID, 12
|
107
|
+
optional :instanceIndex, :int32, 13
|
108
|
+
optional :instanceId, :string, 14
|
109
|
+
end
|
110
|
+
end
|
data/lib/sonde/log.pb.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
## Generated from log.proto for events
|
2
|
+
require "beefcake"
|
3
|
+
|
4
|
+
module Sonde
|
5
|
+
|
6
|
+
class LogMessage
|
7
|
+
include Beefcake::Message
|
8
|
+
|
9
|
+
module MessageType
|
10
|
+
OUT = 1
|
11
|
+
ERR = 2
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class LogMessage
|
16
|
+
required :message, :bytes, 1
|
17
|
+
required :message_type, LogMessage::MessageType, 2
|
18
|
+
required :timestamp, :int64, 3
|
19
|
+
optional :app_id, :string, 4
|
20
|
+
optional :source_type, :string, 5
|
21
|
+
optional :source_instance, :string, 6
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
## Generated from metric.proto for events
|
2
|
+
require "beefcake"
|
3
|
+
|
4
|
+
module Sonde
|
5
|
+
|
6
|
+
class ValueMetric
|
7
|
+
include Beefcake::Message
|
8
|
+
end
|
9
|
+
|
10
|
+
class CounterEvent
|
11
|
+
include Beefcake::Message
|
12
|
+
end
|
13
|
+
|
14
|
+
class ContainerMetric
|
15
|
+
include Beefcake::Message
|
16
|
+
end
|
17
|
+
|
18
|
+
class ValueMetric
|
19
|
+
required :name, :string, 1
|
20
|
+
required :value, :double, 2
|
21
|
+
required :unit, :string, 3
|
22
|
+
end
|
23
|
+
|
24
|
+
class CounterEvent
|
25
|
+
required :name, :string, 1
|
26
|
+
required :delta, :uint64, 2
|
27
|
+
optional :total, :uint64, 3
|
28
|
+
end
|
29
|
+
|
30
|
+
class ContainerMetric
|
31
|
+
required :applicationId, :string, 1
|
32
|
+
required :instanceIndex, :int32, 2
|
33
|
+
required :cpuPercentage, :double, 3
|
34
|
+
required :memoryBytes, :uint64, 4
|
35
|
+
required :diskBytes, :uint64, 5
|
36
|
+
end
|
37
|
+
end
|
data/lib/sonde/sonde_extender.rb
CHANGED
data/loggregator_emitter.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loggregator_emitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beefcake
|
@@ -98,9 +98,14 @@ files:
|
|
98
98
|
- lib/loggregator_messages/log_message.pb.rb
|
99
99
|
- lib/loggregator_messages/log_message.proto
|
100
100
|
- lib/loggregator_messages/log_message_extender.rb
|
101
|
-
- lib/sonde
|
102
|
-
- lib/sonde/
|
101
|
+
- lib/sonde.rb
|
102
|
+
- lib/sonde/envelope.pb.rb
|
103
|
+
- lib/sonde/error.pb.rb
|
104
|
+
- lib/sonde/http.pb.rb
|
105
|
+
- lib/sonde/log.pb.rb
|
106
|
+
- lib/sonde/metric.pb.rb
|
103
107
|
- lib/sonde/sonde_extender.rb
|
108
|
+
- lib/sonde/uuid.pb.rb
|
104
109
|
- lib/symmetric/encryption.rb
|
105
110
|
- loggregator_emitter.gemspec
|
106
111
|
- spec/loggregator_emitter/emit_performance_spec.rb
|
data/lib/sonde/sonde.pb.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
## Generated from sonde.proto for events
|
2
|
-
require "beefcake"
|
3
|
-
|
4
|
-
module Sonde
|
5
|
-
|
6
|
-
class Envelope
|
7
|
-
include Beefcake::Message
|
8
|
-
|
9
|
-
module EventType
|
10
|
-
LogMessage = 5
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class LogMessage
|
15
|
-
include Beefcake::Message
|
16
|
-
|
17
|
-
module MessageType
|
18
|
-
OUT = 1
|
19
|
-
ERR = 2
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class Envelope
|
24
|
-
required :origin, :string, 1
|
25
|
-
required :eventType, Envelope::EventType, 2
|
26
|
-
optional :timestamp, :int64, 6
|
27
|
-
optional :deployment, :string, 13
|
28
|
-
optional :job, :string, 14
|
29
|
-
optional :index, :string, 15
|
30
|
-
optional :ip, :string, 16
|
31
|
-
optional :logMessage, LogMessage, 8
|
32
|
-
end
|
33
|
-
|
34
|
-
class LogMessage
|
35
|
-
required :message, :bytes, 1
|
36
|
-
required :message_type, LogMessage::MessageType, 2
|
37
|
-
required :timestamp, :int64, 3
|
38
|
-
optional :app_id, :string, 4
|
39
|
-
optional :source_type, :string, 5
|
40
|
-
optional :source_instance, :string, 6
|
41
|
-
end
|
42
|
-
end
|
data/lib/sonde/sonde.proto
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
package events;
|
2
|
-
|
3
|
-
/// Envelope wraps an Event and adds metadata.
|
4
|
-
message Envelope {
|
5
|
-
/// Type of the wrapped event.
|
6
|
-
enum EventType {
|
7
|
-
LogMessage = 5;
|
8
|
-
}
|
9
|
-
|
10
|
-
required string origin = 1; /// Unique description of the origin of this event.
|
11
|
-
required EventType eventType = 2; /// Type of wrapped event. Only the optional field corresponding to the value of eventType should be set.
|
12
|
-
|
13
|
-
optional int64 timestamp = 6; /// UNIX timestamp (in nanoseconds) event was wrapped in this Envelope.
|
14
|
-
|
15
|
-
optional string deployment = 13; /// Deployment name (used to uniquely identify source).
|
16
|
-
optional string job = 14; /// Job name (used to uniquely identify source).
|
17
|
-
optional string index = 15; /// Index of job (used to uniquely identify source).
|
18
|
-
optional string ip = 16; /// IP address (used to uniquely identify source).
|
19
|
-
|
20
|
-
// Removed Heartbeat at position 3
|
21
|
-
optional LogMessage logMessage = 8;
|
22
|
-
}
|
23
|
-
|
24
|
-
/// A LogMessage contains a "log line" and associated metadata.
|
25
|
-
message LogMessage {
|
26
|
-
|
27
|
-
/// MessageType stores the destination of the message (corresponding to STDOUT or STDERR).
|
28
|
-
enum MessageType {
|
29
|
-
OUT = 1;
|
30
|
-
ERR = 2;
|
31
|
-
}
|
32
|
-
|
33
|
-
required bytes message = 1; /// Bytes of the log message. (Note that it is not required to be a single line.)
|
34
|
-
required MessageType message_type = 2; /// Type of the message (OUT or ERR).
|
35
|
-
required int64 timestamp = 3; /// UNIX timestamp (in nanoseconds) when the log was written.
|
36
|
-
optional string app_id = 4; /// Application that emitted the message (or to which the application is related).
|
37
|
-
optional string source_type = 5; /// Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
|
38
|
-
optional string source_instance = 6; /// Instance that emitted the message.
|
39
|
-
}
|