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/

  • 相关阅读:
    POJ 1966 Cable TV Network
    POJ 3204 Ikki's Story I
    Codeforces Round #388 (Div. 2)
    BZOJ 后缀自动机四·重复旋律7
    扩展欧几里得 exGCD
    网络流模板 NetworkFlow
    BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊
    BZOJ 3224: Tyvj 1728 普通平衡树
    BZOJ 1070: [SCOI2007]修车
    BZOJ 4552: [Tjoi2016&Heoi2016]排序
  • 原文地址:https://www.cnblogs.com/lshan/p/11274076.html
Copyright © 2011-2022 走看看