BrowserPerf.proto 2.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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";

option java_multiple_files = true;
option java_package = "org.apache.skywalking.apm.network.language.agent";

import "common/common.proto";

// Collect performance raw data from browser.
service BrowserPerfService {
Z
zhang-wei 已提交
28 29 30 31 32 33 34

    // report once per page
    rpc collectPerfData (BrowserPerfData) returns (Commands) {
    }

    // report one or more error logs for pages, could report multiple times.
    rpc collectErrorLogs (stream BrowserErrorLog) returns (Commands) {
35 36 37 38
    }
}

message BrowserPerfData {
Z
zhang-wei 已提交
39 40 41 42 43 44 45 46 47 48
    int32 serviceId = 1;
    // Service version in browser is the Instance concept in the backend.
    int32 serviceVersionId = 2;
    // Perf data time
    int64 time = 3;
    // Page path in browser is the endpoint concept in the backend
    // Page path in the browser, mostly it is URI, without parameter
    string pagePath = 4;
    int32 pagePathId = 5;
    // Unit of all time related field should be `ms`.
49 50 51
    int32 redirectTime = 6;
    int32 dnsTime = 7;
    int32 reqTime = 8;
Z
zhang-wei 已提交
52
    // analysis dom tree time
53 54
    int32 domAnalysisTime = 9;
    int32 domReadyTime = 10;
Z
zhang-wei 已提交
55
    // page blank time
56
    int32 blankTime = 11;
Z
zhang-wei 已提交
57 58 59
}

message BrowserErrorLog {
Z
zhang-wei 已提交
60 61 62
    // UUID
    string uniqueId = 1;
    int32 serviceId = 2;
63
    // Service version in browser is the Instance concept in the backend.
Z
zhang-wei 已提交
64
    int32 serviceVersionId = 3;
Z
zhang-wei 已提交
65
    // Error log time
Z
zhang-wei 已提交
66
    int64 time = 4;
67
    // Page path in browser is the endpoint concept in the backend
68
    // Page path in the browser, mostly it is URI, without parameter
Z
zhang-wei 已提交
69 70
    string pagePath = 5;
    int32 pagePathId = 6;
Z
zhang-wei 已提交
71 72 73 74 75 76 77
    ErrorCategory category = 7;
    string grade = 8;
    string message = 9;
    int32 line = 10;
    int32 col = 11;
    string stack = 12;
    string errorUrl = 13;
78 79
    // Then the PV with error is only calculated when firstReportedError is true.
    bool firstReportedError = 14;
80 81
}

Z
zhang-wei 已提交
82 83 84 85 86 87 88 89 90
enum ErrorCategory {
    ajax = 0;
    resource = 1;
    vue = 2;
    promise = 3;
    js = 4;
    unknown = 5;
}