Merge pull request #940 from zed-industries/telemetry

Instrument the collab server with OpenTelemetry collecting into Honeycomb.io
This commit is contained in:
Antonio Scandurra 2022-04-29 17:50:55 +02:00 committed by GitHub
commit cddafa5fef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 612 additions and 153 deletions

View file

@ -2,6 +2,7 @@ fn main() {
let mut build = prost_build::Config::new();
// build.protoc_arg("--experimental_allow_proto3_optional");
build
.type_attribute(".", "#[derive(serde::Serialize)]")
.compile_protos(&["proto/zed.proto"], &["proto"])
.unwrap();
}

View file

@ -3,6 +3,7 @@ use anyhow::{anyhow, Result};
use async_tungstenite::tungstenite::Message as WebSocketMessage;
use futures::{SinkExt as _, StreamExt as _};
use prost::Message as _;
use serde::Serialize;
use std::any::{Any, TypeId};
use std::{
io,
@ -11,7 +12,7 @@ use std::{
include!(concat!(env!("OUT_DIR"), "/zed.messages.rs"));
pub trait EnvelopedMessage: Clone + Sized + Send + Sync + 'static {
pub trait EnvelopedMessage: Clone + Serialize + Sized + Send + Sync + 'static {
const NAME: &'static str;
const PRIORITY: MessagePriority;
fn into_envelope(