-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Infinite Tracing Protobuf v5 Files (#1241)
* Add infinite tracing protobuf v5 files * Attempt to load protobuf files without version checks * Revert to using protobuf version for imports --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
eadaff6
commit 791c0a7
Showing
6 changed files
with
124 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Generate pb2 files using the following command: | ||
// python -m grpc_tools.protoc --proto_path=newrelic/core --python_out=newrelic/core newrelic/core/infinite_tracing.proto | ||
|
||
syntax = "proto3"; | ||
|
||
package com.newrelic.trace.v1; | ||
|
||
service IngestService { | ||
// Accepts a stream of Span messages, and returns an irregular stream of | ||
// RecordStatus messages. | ||
rpc RecordSpan(stream Span) returns (stream RecordStatus) {} | ||
|
||
// Accepts a stream of SpanBatch messages, and returns an irregular | ||
// stream of RecordStatus messages. This endpoint can be used to improve | ||
// throughput when Span messages are small | ||
rpc RecordSpanBatch(stream SpanBatch) returns (stream RecordStatus) {} | ||
} | ||
|
||
message SpanBatch { | ||
repeated Span spans = 1; | ||
} | ||
|
||
message Span { | ||
string trace_id = 1; | ||
map<string, AttributeValue> intrinsics = 2; | ||
map<string, AttributeValue> user_attributes = 3; | ||
map<string, AttributeValue> agent_attributes = 4; | ||
} | ||
|
||
message AttributeValue { | ||
oneof value { | ||
string string_value = 1; | ||
bool bool_value = 2; | ||
int64 int_value = 3; | ||
double double_value = 4; | ||
} | ||
} | ||
|
||
message RecordStatus { | ||
uint64 messages_seen = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# -*- coding: utf-8 -*- | ||
# # Copyright 2010 New Relic, Inc. | ||
# | ||
# Licensed 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. | ||
|
||
# Generated by the protocol buffer compiler. DO NOT EDIT! | ||
# NO CHECKED-IN PROTOBUF GENCODE | ||
# source: infinite_tracing.proto | ||
# Protobuf Python Version: 5.27.2 | ||
"""Generated protocol buffer code.""" | ||
from google.protobuf import descriptor as _descriptor | ||
from google.protobuf import descriptor_pool as _descriptor_pool | ||
from google.protobuf import runtime_version as _runtime_version | ||
from google.protobuf import symbol_database as _symbol_database | ||
from google.protobuf.internal import builder as _builder | ||
_runtime_version.ValidateProtobufRuntimeVersion( | ||
_runtime_version.Domain.PUBLIC, | ||
5, | ||
27, | ||
2, | ||
'', | ||
'infinite_tracing.proto' | ||
) | ||
# @@protoc_insertion_point(imports) | ||
|
||
_sym_db = _symbol_database.Default() | ||
|
||
|
||
|
||
|
||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16infinite_tracing.proto\x12\x15\x63om.newrelic.trace.v1\"7\n\tSpanBatch\x12*\n\x05spans\x18\x01 \x03(\x0b\x32\x1b.com.newrelic.trace.v1.Span\"\x86\x04\n\x04Span\x12\x10\n\x08trace_id\x18\x01 \x01(\t\x12?\n\nintrinsics\x18\x02 \x03(\x0b\x32+.com.newrelic.trace.v1.Span.IntrinsicsEntry\x12H\n\x0fuser_attributes\x18\x03 \x03(\x0b\x32/.com.newrelic.trace.v1.Span.UserAttributesEntry\x12J\n\x10\x61gent_attributes\x18\x04 \x03(\x0b\x32\x30.com.newrelic.trace.v1.Span.AgentAttributesEntry\x1aX\n\x0fIntrinsicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.com.newrelic.trace.v1.AttributeValue:\x02\x38\x01\x1a\\\n\x13UserAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.com.newrelic.trace.v1.AttributeValue:\x02\x38\x01\x1a]\n\x14\x41gentAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.com.newrelic.trace.v1.AttributeValue:\x02\x38\x01\"t\n\x0e\x41ttributeValue\x12\x16\n\x0cstring_value\x18\x01 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x02 \x01(\x08H\x00\x12\x13\n\tint_value\x18\x03 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x42\x07\n\x05value\"%\n\x0cRecordStatus\x12\x15\n\rmessages_seen\x18\x01 \x01(\x04\x32\xc5\x01\n\rIngestService\x12T\n\nRecordSpan\x12\x1b.com.newrelic.trace.v1.Span\x1a#.com.newrelic.trace.v1.RecordStatus\"\x00(\x01\x30\x01\x12^\n\x0fRecordSpanBatch\x12 .com.newrelic.trace.v1.SpanBatch\x1a#.com.newrelic.trace.v1.RecordStatus\"\x00(\x01\x30\x01\x62\x06proto3') | ||
|
||
_globals = globals() | ||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) | ||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'infinite_tracing_pb2', _globals) | ||
if not _descriptor._USE_C_DESCRIPTORS: | ||
DESCRIPTOR._loaded_options = None | ||
_globals['_SPAN_INTRINSICSENTRY']._loaded_options = None | ||
_globals['_SPAN_INTRINSICSENTRY']._serialized_options = b'8\001' | ||
_globals['_SPAN_USERATTRIBUTESENTRY']._loaded_options = None | ||
_globals['_SPAN_USERATTRIBUTESENTRY']._serialized_options = b'8\001' | ||
_globals['_SPAN_AGENTATTRIBUTESENTRY']._loaded_options = None | ||
_globals['_SPAN_AGENTATTRIBUTESENTRY']._serialized_options = b'8\001' | ||
_globals['_SPANBATCH']._serialized_start=49 | ||
_globals['_SPANBATCH']._serialized_end=104 | ||
_globals['_SPAN']._serialized_start=107 | ||
_globals['_SPAN']._serialized_end=625 | ||
_globals['_SPAN_INTRINSICSENTRY']._serialized_start=348 | ||
_globals['_SPAN_INTRINSICSENTRY']._serialized_end=436 | ||
_globals['_SPAN_USERATTRIBUTESENTRY']._serialized_start=438 | ||
_globals['_SPAN_USERATTRIBUTESENTRY']._serialized_end=530 | ||
_globals['_SPAN_AGENTATTRIBUTESENTRY']._serialized_start=532 | ||
_globals['_SPAN_AGENTATTRIBUTESENTRY']._serialized_end=625 | ||
_globals['_ATTRIBUTEVALUE']._serialized_start=627 | ||
_globals['_ATTRIBUTEVALUE']._serialized_end=743 | ||
_globals['_RECORDSTATUS']._serialized_start=745 | ||
_globals['_RECORDSTATUS']._serialized_end=782 | ||
_globals['_INGESTSERVICE']._serialized_start=785 | ||
_globals['_INGESTSERVICE']._serialized_end=982 | ||
# @@protoc_insertion_point(module_scope) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters