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/