Add Resource to Span (#174)

* Add Resource to Span

* Add missing import

* Update to correct id and increment next id

* PR comments

* Add resource to bazel build dep

* Add another dependency

* PR comments
pull/175/head
Steven Karis 6 years ago committed by Bogdan Drutu
parent 6d79e46232
commit fb7c17e3be
  1. 4
      src/opencensus/proto/agent/common/v1/common.proto
  2. 2
      src/opencensus/proto/trace/v1/BUILD.bazel
  3. 8
      src/opencensus/proto/trace/v1/trace.proto

@ -27,8 +27,8 @@ option java_outer_classname = "CommonProto";
option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1";
// Identifier metadata of the Node (Application instrumented with OpenCensus)
// that connects to OpenCensus Agent.
// Identifier metadata of the Node that produces the span or tracing data.
// Note, this is not the metadata about the Node or service that is described by associated spans.
// In the future we plan to extend the identifier proto definition to support
// additional information (e.g cloud id, etc.)
message Node {

@ -23,6 +23,7 @@ proto_library(
deps = [
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
"//opencensus/proto/resource/v1:resource_proto",
],
)
@ -58,6 +59,7 @@ go_proto_library(
deps = [
"@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
"@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
"//opencensus/proto/resource/v1:resource_proto_go",
],
)

@ -16,6 +16,7 @@ syntax = "proto3";
package opencensus.proto.trace.v1;
import "opencensus/proto/resource/v1/resource.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
@ -33,7 +34,7 @@ option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/t
// multiple root spans, or none at all. Spans do not need to be
// contiguous - there may be gaps or overlaps between spans in a trace.
//
// The next id is 16.
// The next id is 17.
// TODO(bdrutu): Add an example.
message Span {
// A unique identifier for a trace. All spans from the same trace share
@ -290,6 +291,11 @@ message Span {
// Status.Ok (code = 0).
Status status = 11;
// An optional resource that is associated with this span. If not set, this span
// should be part of a batch that does include the resource information, unless resource
// information is unknown.
opencensus.proto.resource.v1.Resource resource = 16;
// A highly recommended but not required flag that identifies when a
// trace crosses a process boundary. True when the parent_span belongs
// to the same process as the current span. This flag is most commonly

Loading…
Cancel
Save