teleport/proto/prehog/v1alpha/tbot.proto
Noah Stride 6eaea0300e
Machine ID Agent Anonymous Analytics (#22174)
* Start fleshing out tbot anonymous analytics submission

* Support overriding telemetry endpoint

* Add debug message on success

* Refactor sendTelemetry to be compatible with unit testing

* Improve telemetry log message cppy

* Ensure exit occurs after telemetry submitted

* Improve mocking for tests

* Finish automated test

* Fix imports

* Switch to info level message when nto enabled

* Use preferred package import anme

* Use tbot specific telemetry endpoints

* Use start time instead of now in timestamp

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Add missing license headers

* Add brief comment

* Correct staging domain

* Ensure anonymous telemetry sends

* Exit telemetry wait early if context is already cancelled

* Correct linter errors

* Fail faster on telemetry submission

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-03-06 10:24:07 +00:00

63 lines
2 KiB
Protocol Buffer

// Copyright 2022 Gravitational, 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.
syntax = "proto3";
package prehog.v1alpha;
import "google/protobuf/timestamp.proto";
option go_package = "github.com/gravitational/teleport/gen/proto/go/prehog/v1alpha";
// TbotStartEvent is triggered whenever tbot starts, regardless of whether tbot
// was able to successfully connect to or authenticate with a Teleport cluster.
message TbotStartEvent {
// RunMode specifies whether or not tbot has been configured to run once
// and output certificates, or continually renew certificates in the
// background.
enum RunMode {
RUN_MODE_UNSPECIFIED = 0;
RUN_MODE_ONE_SHOT = 1;
RUN_MODE_DAEMON = 2;
}
RunMode run_mode = 1;
string version = 2;
string join_type = 3;
string helper = 4;
string helper_version = 5;
int32 destinations_other = 6;
int32 destinations_database = 7;
int32 destinations_kubernetes = 8;
int32 destinations_application = 9;
}
message SubmitTbotEventRequest {
// uuid identifying that tbot session. This is future-proofing for if we
// decide to add multiple events in future, and need to tie them together.
string distinct_id = 1;
// optional, will default to the ingest time if unset
google.protobuf.Timestamp timestamp = 2;
oneof event {
TbotStartEvent start = 3;
}
}
message SubmitTbotEventResponse {}
service TbotReportingService {
rpc SubmitTbotEvent(SubmitTbotEventRequest) returns (SubmitTbotEventResponse) {}
}