zoukankan      html  css  js  c++  java
  • skywalking 服务间链路追踪 (2) ---使用

    1.下载/agent.tar    

      baiduyun /seain/skywalking/

    2.解压agent.tar

    修改:/agent/config/agent.config

    # 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.
    
    # The agent namespace
    # agent.namespace=${SW_AGENT_NAMESPACE:default-namespace}
    
    # The service name in UI  修改为自己服务名
    agent.service_name=${SW_AGENT_NAME:Your_ApplicationName}
    
    # The number of sampled traces per 3 seconds
    # Negative number means sample traces as many as possible, most likely 100%
    # agent.sample_n_per_3_secs=${SW_AGENT_SAMPLE:-1}
    
    # Authentication active is based on backend setting, see application.yml for more details.
    # agent.authentication = ${SW_AGENT_AUTHENTICATION:xxxx}
    
    # The max amount of spans in a single segment.
    # Through this config item, skywalking keep your application memory cost estimated.
    # agent.span_limit_per_segment=${SW_AGENT_SPAN_LIMIT:300}
    
    # Ignore the segments if their operation names end with these suffix.
    # agent.ignore_suffix=${SW_AGENT_IGNORE_SUFFIX:.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg}
    
    # If true, skywalking agent will save all instrumented classes files in `/debugging` folder.
    # Skywalking team may ask for these files in order to resolve compatible problem.
    # agent.is_open_debugging_class = ${SW_AGENT_OPEN_DEBUG:true}
    
    # Backend service addresses.  修改后台服务的地址
    collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:11800}
    
    # Logging level
    logging.level=${SW_LOGGING_LEVEL:DEBUG}

    配置过滤哪些不用监听:

    修改:/config/apm-trace-ignore-plugin.config

    # 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.
    
    # If the operation name of the first span is matching, this segment should be ignored
    #  ant path match style
    #  /path/?   Match any single character
    #  /path/*   Match any number of characters
    #  /path/**  Match any number of characters and support multilevel directories
    #  Multiple path comma separation, like trace.ignore_path=/eureka/**,/consul/**
    trace.ignore_path=/eureka/**,Mysql/JDBI/**,**/instances,/instances/**,/api/v2/**,/actuator/**,/swagger-resources/**,**/v2/**,/webjars/**

    3.运行jar

    3.1直接在service 上运行

    java -javaagent: /home/sea/agent/skywalking-agent.jar 

    3.2  跟项目一起运行

    java -javaagent: /home/sea/agent/skywalking-agent.jar -jar sea-subscription-service-0.0.1-SNAPSHOT02.jar --spring.config.location=/home/sea/application-dev.properties

    3.3 访问http://192.168.18.177:11000/

  • 相关阅读:
    反射创建对象
    DevExpress 日期输入框
    SsdlToSql10.tt文件内容
    ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
    DevExpress XtraCharts 图表导出PDF/XLS/JPEG
    Java中堆内存和栈内存详解(转)
    批量合并word文档
    java内部类总结(转)
    Java 之工厂方法和抽象工厂模式(转)
    Java GC 、引用
  • 原文地址:https://www.cnblogs.com/lshan/p/11274076.html
Copyright © 2011-2022 走看看