两周前我有机会与 honeycomb.io 合作,主要是我正在更改发送数据的代码 appinsights azre 现在也需要将数据发送到 honeycomb。虽然不太复杂,但是很难捕捉到这些
记录行并确保我们是否正确调用端点以及发送了哪些数据。 appinsights 有一个很棒的插件 https://github.com/Socolin/ApplicationInsightsRiderPlugin 但没有可以显示 opentelemetry 调用的插件,是的 honeycomb.io 使用 OTEL 协议意味着 opentelemetry 现在是可观察性的行业标准。
所以我需要学习如何查看 opentelemetry 调试日志,这不容易配置,因为 opentelemetry API 要求你配置控制台导出器,它会在日志中显示一些数据,如下所示
Activity.TraceId: 39de3d235089b014c5e37abefdc3a7f8 Activity.SpanId: 03ae17902e901577 Activity.TraceFlags: Recorded Activity.ActivitySourceName: Microsoft.AspNetCore Activity.DisplayName: GET Hello Activity.Kind: Server Activity.StartTime: 2024-10-06T21:53:05.9553689Z Activity.Duration: 00:00:00.2187686 Activity.Tags: server.address: localhost server.port: 8080 http.request.method: GET url.scheme: http url.path: /Hello network.protocol.version: 1.1 user_agent.original: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 http.route: Hello http.response.status_code: 200 Resource associated with Activity: service.name: my-service-name telemetry.sdk.name: opentelemetry telemetry.sdk.language: dotnet telemetry.sdk.version: 1.9.0
这需要更改为 json 以便我解析它并在骑手调试窗口中更好地显示它,所以我编写了这个新的导出器。
{"activity":{"traceId":"b49d03d8b55c2f8dfc9f385b3191fdee","spanId":"47c531f9a5a32dca","activityTraceFlags":"Recorded","parentSpanId":"0000000000000000","activitySourceName":"Microsoft.AspNetCore","activitySourceVersion":"","displayName":"GET Hello","kind":"Server","startTime":"2024-10-06T21:54:22.8551436Z","duration":"00:00:00.0013247","tags":{"server.address":"localhost","server.port":"8080","http.request.method":"GET","url.scheme":"http","url.path":"/Hello","network.protocol.version":"1.1","user_agent.original":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0","http.route":"Hello","http.response.status_code":"200"},"statusCode":"Unset","events":[],"links":[],"resource":{"service.name":"my-service-name","telemetry.sdk.name":"opentelemetry","telemetry.sdk.language":"dotnet","telemetry.sdk.version":"1.9.0"},"rootId":"b49d03d8b55c2f8dfc9f385b3191fdee","operationName":"Microsoft.AspNetCore.Hosting.HttpRequestIn"}}
现在我有了 json 调试日志,我所需要的就是从 Socolin 的插件中删除 appinsights 并解析 opentelemetry json 并将其显示在调试窗口中。
在此处查看视频或屏幕截图
以上是如何发布用于 opentelemetry/honeycomb 的 JetBrains Rider 插件的详细内容。更多信息请关注PHP中文网其他相关文章!

JvMenablesJava的“写入,runanywhere” bycompilingCodeIntoplatform-独立bytecode,whatittheninterpretsorpretsorcompilesIntolachine-specificcode.itoptimizesperformizesperformanceWithJitCompilationWithJitCompilation,ManagesMemoryThroughgargargargarggarbagecollection,and andensuressececerity

JVM版本对Java程序的影响包括兼容性、性能优化、垃圾回收策略、安全性和语言特性。1)兼容性:确保代码和依赖库在新JVM上运行。2)性能:新JVM提升垃圾回收和JIT编译性能。3)安全性:修复安全漏洞,提升整体安全性。4)新特性:如Java8的Lambda表达式和Java17的ZGC垃圾收集器,简化代码并提升效率。

JVM实现Java的“一次编写,到处运行”通过将Java字节码转换为特定于机器的指令。1.类加载器加载类。2.运行时数据区存储数据。3.执行引擎转换字节码。4.JNI允许与其他语言交互。5.本地方法库支持JNI调用。

java'spowerstemsssfrom:1)平台独立viabytecodeandjvm,enaplingCross-platformDevelopment; 2)面向对象的程序,促进促进,促进modularityThroughCapsulation,sastalitance,sastalitance和pollemyormormormormormormormormormormormorphism; 3)AutomaticMememoryManagementwithGargarGargarGargarBagagagageCollection,reduccoltection,reduccoltection

No,theJVMisnotthesameforeveryplatform.1)TheJVMprovidesalayerofabstractionforrunningJavabytecode,butitsimplementationvariesbyplatform.2)DifferentversionsoftheJVM,likeOracle'sHotSpot,aretailoredforspecificoperatingsystemstooptimizeperformanceandcompati

Java是平台独立的,因为其"一次编写,到处运行"的设计理念,依赖于Java虚拟机(JVM)和字节码。1)Java代码编译成字节码,由JVM解释或即时编译在本地运行。2)需要注意库依赖、性能差异和环境配置。3)使用标准库、跨平台测试和版本管理是确保平台独立性的最佳实践。

Java'splatFormIndenceIsnotsimple; itinvolvesComplexities.1)jvmCompatiblemustbeiblemustbeensurecensuredAcrospPlatForms.2)nativelibrariesandsycallsneedcarefulhandling.3)

Java'splatformindependencebenefitswebapplicationsbyallowingcodetorunonanysystemwithaJVM,simplifyingdeploymentandscaling.Itenables:1)easydeploymentacrossdifferentservers,2)seamlessscalingacrosscloudplatforms,and3)consistentdevelopmenttodeploymentproce


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

适用于 Eclipse 的 SAP NetWeaver 服务器适配器
将Eclipse与SAP NetWeaver应用服务器集成。

记事本++7.3.1
好用且免费的代码编辑器

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境