<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>continuous-profiling on </title>
    <link>/tags/continuous-profiling/</link>
    <description>Recent content in continuous-profiling on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 02 Apr 2026 10:00:00 +0800</lastBuildDate><atom:link href="/tags/continuous-profiling/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Spring Boot 3.5 &#43; OpenTelemetry 实践笔记（2026）</title>
      <link>/posts/spring-boot-35-otel-best-practices/</link>
      <pubDate>Thu, 02 Apr 2026 10:00:00 +0800</pubDate>
      
      <guid>/posts/spring-boot-35-otel-best-practices/</guid>
      <description>背景 在 2026 年，虽然 Spring Boot 4 已经发布，但大多数企业项目（包括我当前的工作项目）仍基于 Spring Boot 3.5，且没有立即升级到 Spring Boot 4 的计划。就我这次接入来说，Spring Boot 3.5 + Java 25 提供的 OpenTelemetry 自动配置已经覆盖了很多常见场景，剩下的主要是按项目需要做取舍。
本文以一个三服务微服务项目（hello-service → user-service + greeting-service）为例，记录我在 Spring Boot 3.5 下接入 OTel 的过程。项目代码完全开源，更适合作为一个可对照的 demo，而不是放之四海而皆准的模板。
实践思路：这个示例先不使用 Javaagent。 主要考虑是想把接入路径尽量放在 Spring Boot 自身的自动配置和 Micrometer Observation 上，这样更容易观察 AOT / Native Image 场景里的行为，也少一层运行时黑盒。对这个 demo 来说，这样的取舍已经够用。
先从 Agentless 方案试起，利用 Micrometer 实现原生可观测性（参见 Micrometer Observation Documentation） 尽量少写接入代码，优先让 Spring Boot 自动配置接管 启用 Java 25 Virtual Threads，观察它在 I/O 场景下的表现（参见 Project Loom） 使用 JFR（Java Flight Recorder）持续性能分析，补全可观测性的第四个信号 用 ArchUnit harness 固化关键约束 项目代码：github.</description>
    </item>
    
  </channel>
</rss>
