Skywalking-9.6.0系列之本地源码编译并启动

2023-11-13

Skywalking相信有很多人使用过,通过容器或者下载安装包进行安装的,今天从源代码角度,拉取、构建、启动。
官方文档步骤简洁明了,我这边会结合自己遇到的一些问题做出总结。

当前构建资源版本:

  • MAC 10.15.7
  • IDEA 2021.2
  • node v16.14.0 (据代码要求安装了一个新版本)
  • npm 8.3.1
  • Skywalking 9.6.0-SNAPSHOT
  • JDK 11 (最新的代码要看最新的要求,注意不能使用JDK8,用错的话构建时也会有提示)
  • Maven 3.6.0

官方指南(必看):https://github.com/apache/skywalking/blob/master/docs/en/guides/How-to-build.md

快速阅览

流程1:源码获取

方法一:fork代码后,在自己的仓库下 git clone源代码
方法二:下载源码包后解压

【下载失败,网络问题,只能自行解决】

流程2:submodule模块初始化

.gitsubmodules文件

[submodule "apm-protocol/apm-network/src/main/proto"]
	path = apm-protocol/apm-network/src/main/proto
	url = https://github.com/apache/skywalking-data-collect-protocol.git
[submodule "oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol"]
	path = oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
	url = https://github.com/apache/skywalking-query-protocol.git
[submodule "test/e2e-v2/java-test-service/e2e-protocol/src/main/proto"]
	path = test/e2e-v2/java-test-service/e2e-protocol/src/main/proto
	url = https://github.com/apache/skywalking-data-collect-protocol.git
[submodule "skywalking-ui"]
	path = skywalking-ui
	url = https://github.com/apache/skywalking-booster-ui.git

以上可以看出关联的仓库数据主要有:

  • https://github.com/apache/skywalking-data-collect-protocol.git
  • https://github.com/apache/skywalking-query-protocol.git
  • https://github.com/apache/skywalking-data-collect-protocol.git
  • https://github.com/apache/skywalking-booster-ui.git

执行以下命令,来获取这些代码数据:

git submodule init //初始化仓库目录位置
git submodule update //**这步骤至关重要**

这个环节由于涉及四个仓库的代码拉取,此时如果网络状况不佳,很有可能存在【空文件夹】的情况,所以可以这样解决:

方法一:保障网络稳定,删除拉取的空文件夹,再重新git submodule init AND git submodule update ,重复尝试直至拉取成功
关注这些项目文件夹:

  • apm-protocol/apm-network/src/main/proto
  • oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
  • test/e2e-v2/java-test-service/e2e-protocol/src/main/proto
  • skywalking-ui

方法二: 去除.gitsubmodules文件中的内容,按照需求取拉取对应的代码,参照【gitsubmodules】文件目录要求放到指定的文件夹内

以上,可能存在的问题主要就是网络方面,如果以上项目目录未拉全就去执行下一步构建,会产生很多报错,这步必须确认好

或者流程1&2:二合一

git clone --recurse-submodules https://github.com/apache/skywalking.git

也就是clone代码,并且把submodules一起拉下来

流程3:构建项目

前提确认一下JDK 11+ & Maven 3.6+ 的环境,最好提前安装node要求的版本

项目根目录下执行./mvnw clean package -Dmaven.test.skip,构建项目较多,可能需要几分钟时间

这个步骤遇到比较多的问题,基本都是卡在node版本的下载和npm依赖包的拉取上,最终skywalking-ui的项目始终build不成功

  1. node版本的下载,本地有8和18的版本,当前构建需要16的版本,下载网速出了问题

    当前用到的v16.14.0,还可以确认一下node和npm的版本映射关系(https://nodejs.org/zh-cn/download/releases),我当前在npm8.3.1,是可以兼容

  2. npm install拉取依赖包也存在网速问题,可以替换镜像源

    skywalking/apm-webapp/pom.xml 中,找到

        <arguments>install --registry=https://registry.npmjs.org/</arguments>
         <!--修改为淘宝镜像-->
        <arguments>install --registry=https://registry.npm.taobao.org/</arguments>
    
  3. 【qiang】的问题,以为会变快,其实反作用

  4. 整体流程构建如果最终都是卡在skywalking-ui前端项目的构建上,可以单独使用对应的node版本去这个项目下单独npm install & npm run build 确认下,避免要重头再来,时间比较长

最终:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for apm 9.6.0-SNAPSHOT:
[INFO] 
[INFO] apm ................................................ SUCCESS [  5.195 s]
[INFO] oap-protocol ....................................... SUCCESS [  0.335 s]
[INFO] apm-network ........................................ SUCCESS [ 28.284 s]
[INFO] oap-server ......................................... SUCCESS [  0.446 s]
[INFO] server-library ..................................... SUCCESS [  0.280 s]
[INFO] library-util ....................................... SUCCESS [  4.413 s]
[INFO] library-module ..................................... SUCCESS [  1.693 s]
[INFO] server-telemetry ................................... SUCCESS [  0.187 s]
[INFO] telemetry-api ...................................... SUCCESS [  1.580 s]
[INFO] server-testing ..................................... SUCCESS [  1.385 s]
[INFO] server-configuration ............................... SUCCESS [  0.372 s]
[INFO] configuration-api .................................. SUCCESS [  1.714 s]
[INFO] library-elasticsearch-client ....................... SUCCESS [  7.733 s]
[INFO] library-client ..................................... SUCCESS [  2.882 s]
[INFO] library-server ..................................... SUCCESS [  1.853 s]
[INFO] library-datacarrier-queue .......................... SUCCESS [  0.902 s]
[INFO] ai-pipeline ........................................ SUCCESS [  2.719 s]
[INFO] server-core ........................................ SUCCESS [ 27.428 s]
[INFO] library-kubernetes-support ......................... SUCCESS [  1.696 s]
[INFO] analyzer ........................................... SUCCESS [  0.509 s]
[INFO] meter-analyzer ..................................... SUCCESS [  4.938 s]
[INFO] agent-analyzer ..................................... SUCCESS [  4.672 s]
[INFO] log-analyzer ....................................... SUCCESS [  3.668 s]
[INFO] event-analyzer ..................................... SUCCESS [  1.611 s]
[INFO] server-receiver-plugin ............................. SUCCESS [  0.982 s]
[INFO] skywalking-sharing-server-plugin ................... SUCCESS [  1.546 s]
[INFO] skywalking-trace-receiver-plugin ................... SUCCESS [  2.440 s]
[INFO] zipkin-receiver-plugin ............................. SUCCESS [  1.786 s]
[INFO] skywalking-mesh-receiver-plugin .................... SUCCESS [  1.946 s]
[INFO] skywalking-management-receiver-plugin .............. SUCCESS [  1.607 s]
[INFO] skywalking-jvm-receiver-plugin ..................... SUCCESS [  1.963 s]
[INFO] receiver-proto ..................................... SUCCESS [ 17.060 s]
[INFO] envoy-metrics-receiver-plugin ...................... SUCCESS [  3.926 s]
[INFO] skywalking-clr-receiver-plugin ..................... SUCCESS [  1.542 s]
[INFO] skywalking-profile-receiver-plugin ................. SUCCESS [  1.549 s]
[INFO] otel-receiver-plugin ............................... SUCCESS [  2.132 s]
[INFO] skywalking-meter-receiver-plugin ................... SUCCESS [  1.976 s]
[INFO] skywalking-browser-receiver-plugin ................. SUCCESS [  2.540 s]
[INFO] skywalking-log-receiver-plugin ..................... SUCCESS [  2.236 s]
[INFO] configuration-discovery-receiver-plugin ............ SUCCESS [  2.265 s]
[INFO] skywalking-event-receiver-plugin ................... SUCCESS [  2.095 s]
[INFO] skywalking-zabbix-receiver-plugin .................. SUCCESS [  3.999 s]
[INFO] skywalking-ebpf-receiver-plugin .................... SUCCESS [  2.799 s]
[INFO] skywalking-telegraf-receiver-plugin ................ SUCCESS [  2.467 s]
[INFO] aws-firehose-receiver .............................. SUCCESS [  7.095 s]
[INFO] server-cluster-plugin .............................. SUCCESS [  0.148 s]
[INFO] cluster-zookeeper-plugin ........................... SUCCESS [  1.676 s]
[INFO] cluster-standalone-plugin .......................... SUCCESS [  1.344 s]
[INFO] cluster-kubernetes-plugin .......................... SUCCESS [  1.972 s]
[INFO] cluster-consul-plugin .............................. SUCCESS [  1.811 s]
[INFO] cluster-etcd-plugin ................................ SUCCESS [  1.955 s]
[INFO] cluster-nacos-plugin ............................... SUCCESS [  1.982 s]
[INFO] server-storage-plugin .............................. SUCCESS [  0.120 s]
[INFO] storage-jdbc-hikaricp-plugin ....................... SUCCESS [  5.366 s]
[INFO] storage-elasticsearch-plugin ....................... SUCCESS [  4.129 s]
[INFO] storage-banyandb-plugin ............................ SUCCESS [  4.208 s]
[INFO] oal-grammar ........................................ SUCCESS [  1.128 s]
[INFO] oal-rt ............................................. SUCCESS [  2.740 s]
[INFO] server-query-plugin ................................ SUCCESS [  0.134 s]
[INFO] zipkin-query-plugin ................................ SUCCESS [  2.032 s]
[INFO] server-fetcher-plugin .............................. SUCCESS [  0.111 s]
[INFO] kafka-fetcher-plugin ............................... SUCCESS [  3.037 s]
[INFO] server-health-checker .............................. SUCCESS [  1.661 s]
[INFO] mqe-grammar ........................................ SUCCESS [  0.735 s]
[INFO] mqe-rt ............................................. SUCCESS [  2.202 s]
[INFO] query-graphql-plugin ............................... SUCCESS [  3.807 s]
[INFO] promql-plugin ...................................... SUCCESS [  3.402 s]
[INFO] logql-plugin ....................................... SUCCESS [  1.966 s]
[INFO] server-alarm-plugin ................................ SUCCESS [  5.635 s]
[INFO] telemetry-prometheus ............................... SUCCESS [  1.485 s]
[INFO] exporter ........................................... SUCCESS [  3.927 s]
[INFO] grpc-configuration-sync ............................ SUCCESS [  2.922 s]
[INFO] configuration-apollo ............................... SUCCESS [  1.624 s]
[INFO] configuration-zookeeper ............................ SUCCESS [  1.661 s]
[INFO] configuration-etcd ................................. SUCCESS [  1.129 s]
[INFO] configuration-consul ............................... SUCCESS [  1.498 s]
[INFO] configuration-k8s-configmap ........................ SUCCESS [  1.837 s]
[INFO] configuration-nacos ................................ SUCCESS [  1.452 s]
[INFO] server-starter ..................................... SUCCESS [  7.200 s]
[INFO] server-tools ....................................... SUCCESS [  0.096 s]
[INFO] profile-exporter ................................... SUCCESS [  0.091 s]
[INFO] tool-profile-snapshot-server-mock .................. SUCCESS [  1.363 s]
[INFO] tool-profile-snapshot-bootstrap .................... SUCCESS [  2.893 s]
[INFO] tool-profile-snapshot-exporter ..................... SUCCESS [  3.118 s]
[INFO] data-generator ..................................... SUCCESS [  4.334 s]
[INFO] microbench ......................................... SUCCESS [  8.785 s]
[INFO] oap-server-bom ..................................... SUCCESS [  0.059 s]
[INFO] apm-webapp ......................................... SUCCESS [03:32 min]
[INFO] apache-skywalking-apm .............................. SUCCESS [ 37.877 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:42 min
[INFO] Finished at: 2023-08-09T18:59:37+08:00
[INFO] ------------------------------------------------------------------------

流程4:构建产生的源代码数据加入项目索引

IDEA中,可以找到对应的目录,右键 “Mark Dictory as” -> “Generated Sources Root”,将构建产生的数据加入编辑器的索引中

  • apm-protocol/apm-network/target/generated-sources/protobuf
  • oap-server/server-core/target/generated-sources/protobuf
  • oap-server/server-receiver-plugin/receiver-proto/target/generated-sources/fbs
  • oap-server/server-receiver-plugin/receiver-proto/target/generated-sources/protobuf
  • oap-server/exporter/target/generated-sources/protobuf
  • oap-server/server-configuration/grpc-configuration-sync/target/generated-sources/protobuf
  • oap-server/server-alarm-plugin/target/generated-sources/protobuf
  • oap-server/oal-grammar/target/generated-sources

流程5:启动前后端代码

1.启动OAP核心服务,接收数据上报与数据查询

  • /skywalking/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
  • 后端项目启动,存储的数据默认是H2,也可以自己根据标准版本部署对应的elastcisearch版本进行配置
  • 由于整体是插件化的架构风格,在组件的选择上使用 selector 即可快速锁定选择的组件。默认存储是h2,修改为es的只要 selector: ${SW_STORAGE:elasticsearch} 并修改下方elasticsearch对应的配置即可
storage:
  selector: ${SW_STORAGE:h2} #--> 修改
  elasticsearch:
    namespace: ${SW_NAMESPACE:""}
    clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}
    protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"}
    connectTimeout: ${SW_STORAGE_ES_CONNECT_TIMEOUT:3000}
    socketTimeout: ${SW_STORAGE_ES_SOCKET_TIMEOUT:30000}
    responseTimeout: ${SW_STORAGE_ES_RESPONSE_TIMEOUT:15000}
    numHttpClientThread: ${SW_STORAGE_ES_NUM_HTTP_CLIENT_THREAD:0}
    user: ${SW_ES_USER:""}
    password: ${SW_ES_PASSWORD:""}
    trustStorePath: ${SW_STORAGE_ES_SSL_JKS_PATH:""}
    trustStorePass: ${SW_STORAGE_ES_SSL_JKS_PASS:""}
    secretsManagementFile: ${SW_ES_SECRETS_MANAGEMENT_FILE:""} # Secrets management file in the properties format includes the username, password, which are managed by 3rd party tool.
    dayStep: ${SW_STORAGE_DAY_STEP:1} # Represent the number of days in the one minute/hour/day index.
    indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:1} # Shard number of new indexes
    indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:1} # Replicas number of new indexes
    # Specify the settings for each index individually.
    # If configured, this setting has the highest priority and overrides the generic settings.
    specificIndexSettings: ${SW_STORAGE_ES_SPECIFIC_INDEX_SETTINGS:""}
    # Super data set has been defined in the codes, such as trace segments.The following 3 config would be improve es performance when storage super size data in es.
    superDatasetDayStep: ${SW_STORAGE_ES_SUPER_DATASET_DAY_STEP:-1} # Represent the number of days in the super size dataset record index, the default value is the same as dayStep when the value is less than 0
    superDatasetIndexShardsFactor: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_SHARDS_FACTOR:5} #  This factor provides more shards for the super data set, shards number = indexShardsNumber * superDatasetIndexShardsFactor. Also, this factor effects Zipkin traces.
    superDatasetIndexReplicasNumber: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_REPLICAS_NUMBER:0} # Represent the replicas number in the super size dataset record index, the default value is 0.
    indexTemplateOrder: ${SW_STORAGE_ES_INDEX_TEMPLATE_ORDER:0} # the order of index template
    bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:5000} # Execute the async bulk record data every ${SW_STORAGE_ES_BULK_ACTIONS} requests
    batchOfBytes: ${SW_STORAGE_ES_BATCH_OF_BYTES:10485760} # A threshold to control the max body size of ElasticSearch Bulk flush.
    # flush the bulk every 5 seconds whatever the number of requests
    flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:5}
    concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
    resultWindowMaxSize: ${SW_STORAGE_ES_QUERY_MAX_WINDOW_SIZE:10000}
    metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:10000}
    scrollingBatchSize: ${SW_STORAGE_ES_SCROLLING_BATCH_SIZE:5000}
    segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200}
    profileTaskQueryMaxSize: ${SW_STORAGE_ES_QUERY_PROFILE_TASK_SIZE:200}
    profileDataQueryBatchSize: ${SW_STORAGE_ES_QUERY_PROFILE_DATA_BATCH_SIZE:100}
    oapAnalyzer: ${SW_STORAGE_ES_OAP_ANALYZER:"{\"analyzer\":{\"oap_analyzer\":{\"type\":\"stop\"}}}"} # the oap analyzer.
    oapLogAnalyzer: ${SW_STORAGE_ES_OAP_LOG_ANALYZER:"{\"analyzer\":{\"oap_log_analyzer\":{\"type\":\"standard\"}}}"} # the oap log analyzer. It could be customized by the ES analyzer configuration to support more language log formats, such as Chinese log, Japanese log and etc.
    advanced: ${SW_STORAGE_ES_ADVANCED:""}
    # Enable shard metrics and records indices into multi-physical indices, one index template per metric/meter aggregation function or record.
    logicSharding: ${SW_STORAGE_ES_LOGIC_SHARDING:false}
    # Custom routing can reduce the impact of searches. Instead of having to fan out a search request to all the shards in an index, the request can be sent to just the shard that matches the specific routing value (or values).
    enableCustomRouting: ${SW_STORAGE_ES_ENABLE_CUSTOM_ROUTING:false}
  h2:
    properties:
      jdbcUrl: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=FALSE}
      dataSource.user: ${SW_STORAGE_H2_USER:sa}
    metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000}
    maxSizeOfBatchSql: ${SW_STORAGE_MAX_SIZE_OF_BATCH_SQL:100}
    asyncBatchPersistentPoolSize: ${SW_STORAGE_ASYNC_BATCH_PERSISTENT_POOL_SIZE:1}
  • 启动后端服务跑在 127.0.0.1:11800

2.启动web页面项目,供页面操作

  • /skywalking/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java
  • 启动服务跑在 127.0.0.1:8080
  • 浏览器中访问,可以展示菜单页

3.选择一个springBoot项目

  • 可以选择下载skywalking-agent.jar,或者也走源码构建的流程
  • 下载地址:https://skywalking.apache.org/downloads/#JavaAgent
  • 页面选择Java Agent,可以选择源码包构建,或者打包好的distribution的包
  • 这边直接下载打包好的包:https://www.apache.org/dyn/closer.cgi/skywalking/java-agent/8.16.0/apache-skywalking-java-agent-8.16.0.tgz
  • 在springboot启动参数中添加skywalking追踪:-javaagent:~/Downloads/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=demo -Dskywalking.collector.backend_service=127.0.0.1:11800
  • 应用启动后能够查看到DB\REDIS相关的链接请求,访问后端服务接口,几秒后页面能够刷新报表。关注service,instance,endpoint相关指标

以上源码构建,本地部署Skywalking项目就算告一段落啦

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Skywalking-9.6.0系列之本地源码编译并启动 的相关文章

随机推荐

  • 阿里云视频vod.cn-beijing.aliyuncs.com (Domain name not found)

    今天edusoho网校系统突然爆 An exception has been thrown during the rendering of a template Server unreachable Errno 6 Could not re
  • Dynamics CRM 后台代码如何发邮件《 中秋快乐!》

    前面搞了邮箱的配置 那么就可以借助Dynamics CRM工作流来给用户发邮件了 比如签核提醒 什么的 对于这些收件人简单的固定且存在CRM中 比如用户或者联系人的 通过配置就可以实现 但是当邮件通知的人不在CRM中或者收件人cc复杂时 无
  • 记录xss练习 level1-level5(一)

    练习网址 http test xss tv 本人菜鸟一枚 如有分析不对的地方 望前辈们指正 话不投机 不对 话不多说直接上图 上分析 level1 很简单的一道题 从URL中我们可以分析到 xxx level1 php name test
  • 图像处理学习路线总结 python

    记录一下我的图像处理学习路线 后续有其他想法了再补充 目录 1 图像处理基础知识 1 1 数字图像处理公开课 2 利用opencv进行实现 2 1 在pycharm里安装opencv库 2 2 图像处理基础操作 2 2 1 读取图片 2 2
  • Android 控件最上层显示方法

    view bringToFront 可以讲布局在下层的控件放到上层 不被其他控件挡住
  • rails的一点点认识

    1 会开创新项目 rails new 名称 2 会创建控制类 rails g generate controller 类名 html文件名 3 会创建model rails g generate model 名称 散列属性key value
  • ipsec openswan资料搜集

    http blog csdn net rosetta article category 1190390 http blog chinaunix net uid 127037 list 1 html sid 136058 http blog
  • 大数据面试题(五)----HIVE面试题

    版权声明 本文为CSDN博主 北京小辉 的原创文章 遵循 CC 4 0 BY SA 版权协议 转载请附上原文出处链接及本声明 原文链接 https blog csdn net silentwolfyh article details 103
  • 在进入微信小程序之前显示登录页面的解决方案

    这几天想要在小程序进入之前做个登陆的页面 用户输入账号密码正确才能进入小程序 但是看了因为小程序一启动就是默认进入tabar里的第一个页面 上了百度查也是没有哦好的方式 自己琢磨了以下的几种方式 1 使用路由重定向 小程序中有几个用于重新向
  • Spring整合mybatis完整maven配置

    Spring整合mybatis完整maven配置 Maven配置 2022年1月23 基本都是最新版本
  • HTML 表单标签

    一 什么是表单标签 表单是用来采集用户的输入数据 然后将数据提交给服务器 二 表单的组成 一个表单有三个基本组成部分 表单标签 这里面包含了处理表单数据所用程序的URL以及数据提交到服务器的方法 表单域 包含了文本框 密码框 隐藏域 多行文
  • #1295-D: Deprecated declaration I2C_Start - give arg types

    KEIL5编译器报警告 警告内容如下 1295 D Deprecated declaration I2C Start give arg types 警告原因无参数函数的函数声明没有标明参数为void型 在函数声明中加入void即可 警告代码
  • 1.Kubernetes基础入门学习概述系统架构及组件浅析

    目录 0x00 基础简述 1 发展经历 2 简要介绍 3 系统架构 Borg 系统 Kubernetes 系统 0x01 组件浅析 1 Kubernetes Master 2 Kubernetes Node 3 Kubernetes 插件
  • Keras利用卷积神经网络(CNN)识别手写数字(环境python3.5)

    今天介绍如何利用卷积神经网络进行MNIST数据集的手写数字识别 即将手写数字图像images识别为数字标签labels 目录 数据预处理 模型建立 评估模型准确率 进行预测 建模思路如下图 数据预处理 MNIST数据集共有训练数据60 00
  • json to dart工具

    工具链接https javiercbk github io json to dart
  • 单片机开发---ESP32S3移植lvgl+触摸屏

    书接上文 单片机开发 ESP32 S3模块上手 本章内容 熟悉一下ESP32S3的开发 修改范例程序的lvgl 使之能够匹配现在的显示屏 具体工作大概为通过SPI接口连接一块SPI串口屏幕 并且适配lvgl 最后加上触摸屏作为输入 屏幕 用
  • 判断是pc端还是移动端

    Navigator对象 Navigator 对象包含有关浏览器的信息 下面的userAgent 属性是一个只读的字符串 声明了浏览器用于 HTTP 请求的用户代理头的值 所以我们可以通过判断navigator useragent里面是否有某
  • 微信小程序-拒绝了语音权限后,重新授权

    效果图 第一步 封装在utils里 哪个页面需要的话 直接调用 export function impower var t this wx authorize scope scope record success res fail wx s
  • 递归解决八皇后回溯算法

    问题简述 八皇后问题是一个古来而著名的问题 该问题是19世纪著名的数学家高斯同学提出来的 在8 8的国际象棋上摆放八个皇后 使其不能互相的攻击 也就是说 任意的两个皇后不能放在同一行或则是同一个列或者是同一个对角线上 问有多少个摆放的方法
  • Skywalking-9.6.0系列之本地源码编译并启动

    Skywalking相信有很多人使用过 通过容器或者下载安装包进行安装的 今天从源代码角度 拉取 构建 启动 官方文档步骤简洁明了 我这边会结合自己遇到的一些问题做出总结 当前构建资源版本 MAC 10 15 7 IDEA 2021 2 n