{"id":8358,"date":"2025-10-06T10:54:39","date_gmt":"2025-10-06T10:54:39","guid":{"rendered":"https:\/\/pokecon.jp\/job\/?p=8358"},"modified":"2025-10-06T10:54:39","modified_gmt":"2025-10-06T10:54:39","slug":"opentelemetry%e3%81%ae%e8%a8%88%e8%a3%85%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e6%af%94%e8%bc%83-for-database-sql-cybozu-inside-out","status":"publish","type":"post","link":"https:\/\/pokecon.jp\/job\/8358\/","title":{"rendered":"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql &#8211; Cybozu Inside Out"},"content":{"rendered":"\n<\/p>\n<div>\n<h2 id=\"\u306f\u3058\u3081\u306b\">\u306f\u3058\u3081\u306b<\/h2>\n<p>CloudPlatform\u90e8\u306e<a target=\"_blank\" href=\"https:\/\/github.com\/pddg\">pddg<\/a>\u3067\u3059\u3002Go\u306b\u304a\u3051\u308bOpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u3001\u7279\u306bdatabase\/sql\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u3092\u884c\u3046\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u547c\u3079\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u6a5f\u80fd\u3092\u6bd4\u8f03\u3057\u307e\u3068\u3081\u307e\u3057\u305f\u3002\u63a1\u7528\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u5b9f\u969b\u306b\u672c\u756a\u74b0\u5883\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u8a08\u88c5\u306b\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\u3053\u306e\u5185\u5bb9\u306f\u30012025\u5e74\u306b\u958b\u50ac\u3055\u308c\u305f\u30b5\u30de\u30fc\u30a4\u30f3\u30bf\u30fc\u30f3\u30b7\u30c3\u30d7\u306b\u304a\u3044\u3066\u3001\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\uff08\u81ea\u793e\u57fa\u76e4\uff09\u30b3\u30fc\u30b9\u306b\u53c2\u52a0\u3057\u3066\u9802\u3044\u305f<a target=\"_blank\" href=\"https:\/\/github.com\/iesuy-ryanagit\">\u67f3\u7530\u3055\u3093<\/a>\u306b\u304a\u624b\u4f1d\u3044\u9802\u3044\u3066\u307e\u3068\u3081\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u63a1\u7528\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7528\u3044\u308b\u3068\u3001\u308f\u305a\u304b\u306a\u30b3\u30fc\u30c9\u8ffd\u52a0\u3067\u4ee5\u4e0b\u306e\u69d8\u306a\u30c8\u30ec\u30fc\u30b9\u304c\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u6a2a\u68d2\u304c\u5404\u30b9\u30c6\u30c3\u30d7\u306b\u304b\u304b\u3063\u305f\u6642\u9593\u3092\u8868\u3057\u3001\u5404\u30b9\u30c6\u30c3\u30d7\u3054\u3068\u306b\u305d\u306e\u5f15\u6570\u3084\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002\u969c\u5bb3\u767a\u751f\u6642\u306a\u3069\u306b\u306f\u3053\u308c\u3089\u306e\u60c5\u5831\u3092\u6d3b\u7528\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5185\u90e8\u3067\u5b9f\u969b\u306b\u767a\u751f\u3057\u3066\u3044\u305f\u72b6\u6cc1\u3092\u30c7\u30d0\u30c3\u30b0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170034.png\" width=\"800\" height=\"622\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><\/p>\n<h2 id=\"\u80cc\u666f\">\u80cc\u666f<\/h2>\n<p>\u30b5\u30a4\u30dc\u30a6\u30ba\u3067\u306f\u3001\u591a\u6570\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u304cKubernetes\u30d9\u30fc\u30b9\u306e\u30a4\u30f3\u30d5\u30e9\u57fa\u76e4\u4e0a\u3067\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\u3002\u8907\u6570\u306e\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u304c\u4ed6\u306e\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u547c\u3073\u51fa\u3057\u3066\u304a\u308a\u3001\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u969b\u306b\u3069\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u4f55\u304c\u539f\u56e0\u306a\u306e\u304b\u3092\u7279\u5b9a\u3059\u308b\u3053\u3068\u306f\u5bb9\u6613\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u3088\u3046\u306a\u554f\u984c\u306e\u7279\u5b9a\u306b\u5f79\u7acb\u3066\u308b\u305f\u3081\u3001\u30b5\u30fc\u30d3\u30b9\u9593\u306e\u547c\u3073\u51fa\u3057\u3092\u8ffd\u8de1\u3057\u3066\u53ef\u8996\u5316\u3059\u308b\u5206\u6563\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u6280\u8853\u304c\u4e00\u822c\u7684\u306b\u5c0e\u5165\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u30b5\u30a4\u30dc\u30a6\u30ba\u3067\u3082OpenTelemetry\u3092\u7528\u3044\u305f\u5206\u6563\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u306e\u5c0e\u5165\u306b\u53d6\u308a\u7d44\u3093\u3067\u304a\u308a<a target=\"_blank\" href=\"#f-c445c00e\" id=\"fn-c445c00e\" name=\"fn-c445c00e\" title=\"[https:\/\/blog.cybozu.io\/entry\/2023\/04\/12\/170000:embed]\">*1<\/a>\u3001\u6211\u3005\u306e\u30c1\u30fc\u30e0\u3067\u306f\u4e3b\u306bGo\u8a00\u8a9e\u3067\u66f8\u304b\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u306e\u8a08\u88c5\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ed6\u8a00\u8a9e\u306eOpenTelemetry SDK\u306b\u306f\u81ea\u52d5\u8a08\u88c5\u3068\u3044\u3046\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u305b\u305a\u306b\u8a08\u6e2c\u3092\u884c\u3046\u4ed5\u7d44\u307f\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001Go\u8a00\u8a9e\u306eOpenTelemetry SDK\u306b\u306f\u81ea\u52d5\u8a08\u88c5\u306e\u4ed5\u7d44\u307f\u304c\u3042\u308a\u307e\u305b\u3093<a target=\"_blank\" href=\"#f-cc362afe\" id=\"fn-cc362afe\" name=\"fn-cc362afe\" title=\"eBPF\u30d9\u30fc\u30b9\u306e\u81ea\u52d5\u8a08\u88c5\u304c\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u6211\u3005\u306e\u30af\u30e9\u30b9\u30bf\u3067\u306f\u6a29\u9650\u7684\u306b\u5c0e\u5165\u3059\u308b\u306e\u304c\u96e3\u3057\u3044\u3053\u3068\u3084\u3001\u307e\u3060\u767a\u5c55\u9014\u4e0a\u3067\u3042\u308a\u5b89\u5b9a\u6027\u306b\u6b20\u3051\u308b\u3053\u3068\u304b\u3089\u4eca\u56de\u306f\u5bfe\u8c61\u5916\u3068\u3057\u3066\u3044\u307e\u3059\">*2<\/a>\u3002\u305d\u306e\u305f\u3081\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u306b\u304a\u3044\u3066\u660e\u793a\u7684\u306b\u8a08\u6e2c\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<a target=\"_blank\" href=\"#f-0d90f43c\" id=\"fn-0d90f43c\" name=\"fn-0d90f43c\" title=\"\u30d3\u30eb\u30c9\u6642\u306b\u8a08\u88c5\u3092\u8ffd\u52a0\u3059\u308b\u30c4\u30fc\u30eb\u3082\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5178\u578b\u7684\u306a\u30b3\u30fc\u30c9\u4ee5\u5916\u3067\u306f\u3042\u307e\u308a\u3046\u307e\u304f\u52d5\u4f5c\u3057\u306a\u304b\u3063\u305f\u3053\u3068\u304b\u3089\u660e\u793a\u7684\u306b\u5b9f\u88c5\u3059\u308b\u65b9\u91dd\u3068\u3057\u3066\u3044\u307e\u3059\">*3<\/a>\u3002<\/p>\n<p><code>net\/http<\/code>\u3084gRPC\u306a\u3069\u306e\u4e3b\u8981\u306a\u6a5f\u80fd\u306b\u306f\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a<a target=\"_blank\" href=\"#f-746a86af\" id=\"fn-746a86af\" name=\"fn-746a86af\" title=\"[https:\/\/github.com\/open-telemetry\/opentelemetry-go-contrib:embed]\">*4<\/a>\u3001\u6bd4\u8f03\u7684\u5bb9\u6613\u306b\u8a08\u88c5\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3001Go\u8a00\u8a9e\u306e\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b<code>database\/sql<\/code>\u306b\u5bfe\u3059\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u63d0\u4f9b\u3055\u308c\u3066\u304a\u3089\u305a\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u88fd\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5229\u7528\u3092\u691c\u8a0e\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u4eca\u56de\u306e\u30a4\u30f3\u30bf\u30fc\u30f3\u30b7\u30c3\u30d7\u3067\u306f\u3001\u3053\u308c\u307e\u3067\u5f8c\u56de\u3057\u306b\u3057\u3066\u3057\u307e\u3063\u3066\u3044\u305f\u30b5\u30fc\u30d3\u30b9\u306b\u304a\u3051\u308b\u5206\u6563\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u306e\u5c0e\u5165\u304a\u3088\u3073\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u9078\u5b9a\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2 id=\"\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u5b9f\u88c5\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u5b9f\u88c5<\/h2>\n<p>\u6211\u3005\u306e\u4e3b\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3068\u3057\u3066\u306f\u3001database\/sql\u3068github.com\/jmoiron\/sqlx\u3092\u5229\u7528\u3057\u3001MySQL\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u307b\u3068\u3093\u3069\u3067\u3059\u3002<br \/>\n\u307e\u305f\u3001<code>*sql.DB.ExecContext<\/code>\u3084<code>*sql.DB.QueryContext<\/code>\u306a\u3069\u306f\u5229\u7528\u305b\u305a\u3001\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3067\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u304b\u3089\u305d\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u7d5e\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3068\u3057\u3066\u7c21\u5358\u306aTODO\u30a2\u30d7\u30ea\u306eAPI\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u4ee5\u4e0b\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><iframe src=\"https:\/\/hatenablog-parts.com\/embed?url=https%3A%2F%2Fgithub.com%2Fpddg%2Fotel-go-sql\" title=\"GitHub - pddg\/otel-go-sql: Sample repository for tracing database\/sql by OpenTelemetry instrumentation\" class=\"embed-card embed-webcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 155px; max-width: 500px; margin: 10px 0px;\" loading=\"lazy\"><\/iframe><\/p>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u3001\u5404\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7528\u3044\u3066\u8a08\u88c5\u3092\u884c\u3046\u30b3\u30fc\u30c9\u3092\u4f8b\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u30a4\u30f3\u30bf\u30fc\u30f3\u30b7\u30c3\u30d7\u3067\u306f\u6211\u3005\u306e\u5185\u90e8\u30b5\u30fc\u30d3\u30b9\u306e\u30b3\u30fc\u30c9\u3092\u7528\u3044\u3066\u8a08\u88c5\u3092\u884c\u3063\u3066\u3082\u3089\u3063\u3066\u304a\u308a\u3001\u305d\u306e\u969b\u306e\u30b3\u30fc\u30c9\u3084\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u516c\u958b\u306b\u5f53\u305f\u3063\u3066\u30e1\u30f3\u30bf\u30fc\u5074\u3067\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306b\u5dee\u3057\u66ff\u3048\u3055\u305b\u3066\u9802\u3044\u3066\u3044\u307e\u3059\u3002\u3054\u4e86\u627f\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2 id=\"\u6bd4\u8f03\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\">\u6bd4\u8f03\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea<\/h2>\n<p>\u4eca\u56de\u306f\u5019\u88dc\u3068\u3057\u3066\u3044\u304f\u3064\u304b\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30d4\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3001\u5b9f\u969b\u306b\u30ed\u30fc\u30ab\u30eb\u3067\u306e\u8a08\u88c5\u3092\u884c\u3063\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<\/p>\n<ol>\n<li><a target=\"_blank\" href=\"https:\/\/github.com\/uptrace\/opentelemetry-go-extra\/tree\/main\/otelsql\">github.com\/uptrace\/opentelemetry-go-extra\/otelsql<\/a><\/li>\n<li><a target=\"_blank\" href=\"https:\/\/github.com\/XSAM\/otelsql\">github.com\/XSAM\/otelsql<\/a><\/li>\n<li><a target=\"_blank\" href=\"https:\/\/github.com\/nhatthm\/otelsql\">go.nhatio.otelsql<\/a><\/li>\n<\/ol>\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3042\u304f\u307e\u3067\u6211\u3005\u306e\u73fe\u5728\u306e\u30cb\u30fc\u30ba\u3092\u6e80\u305f\u3059\u305f\u3081\u5206\u6563\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u305f\u6bd4\u8f03\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306fOpenTelemetry\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u53ce\u96c6\u306b\u95a2\u3059\u308b\u6a5f\u80fd\u3082\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u8a73\u7d30\u306a\u6bd4\u8f03\u306f\u884c\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>uptrace\u306fOpenTelemetry\u3092\u6d3b\u7528\u3057\u305f\u30aa\u30d6\u30b6\u30fc\u30d0\u30d3\u30ea\u30c6\u30a3\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u5546\u7528\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u4f01\u696d\u3067\u3059\u3002<br \/>\n<a target=\"_blank\" href=\"https:\/\/uptrace.dev\/\">https:\/\/uptrace.dev\/<\/a><\/p>\n<p>\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u306fuptrace\u304cOSS\u3068\u3057\u3066\u516c\u958b\u3057\u3066\u63d0\u4f9b\u3057\u3066\u3044\u308b\u3082\u306e\u3067\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3082\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<iframe src=\"https:\/\/hatenablog-parts.com\/embed?url=https%3A%2F%2Fuptrace.dev%2Fguides%2Fopentelemetry-database-sql\" title=\"OpenTelemetry database sql [otelsql]\" class=\"embed-card embed-webcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 155px; max-width: 500px; margin: 10px 0px;\" loading=\"lazy\"><\/iframe><\/p>\n<p>2025\/9\u6642\u70b9\u3067Star\u6570\u306f\u3053\u306e\u4e2d\u3067\u306f2\u756a\u76ee\u306b\u591a\u304f\u3001351\u3067\u3057\u305f\u3002\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u81ea\u4f53\u306f\u983b\u7e41\u306b\u884c\u308f\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3001uptrace\/opentelemetry-go-extra\u81ea\u4f53\u306e\u6700\u7d42\u30b3\u30df\u30c3\u30c8\u304c2024\u5e7411\u6708\u3067\u3042\u308b\u3053\u3068\u306f\u3084\u3084\u6c17\u306b\u306a\u308b\u70b9\u3067\u3059\u3002<\/p>\n<h3 id=\"\u8a08\u88c5\u65b9\u6cd5\">\u8a08\u88c5\u65b9\u6cd5<\/h3>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">db, err := otelsql.Open(<span class=\"synConstant\">\"mysql\"<\/span>, dsn,\n    otelsql.WithAttributes(semconv.DBSystemNameMySQL),\n    otelsql.WithDBName(<span class=\"synConstant\">\"todoapp\"<\/span>),\n)\n<span class=\"synStatement\">if<\/span> err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> fmt.Errorf(<span class=\"synConstant\">\"failed to open database: %w\"<\/span>, err)\n}\n<span class=\"synStatement\">defer<\/span> db.Close()\n\ntodoService := NewTodoService(sqlx.NewDb(db, <span class=\"synConstant\">\"mysql\"<\/span>))\n<\/pre>\n<p><code>github.com\/uptrace\/opentelemetry-go-extra\/otelsqlx<\/code> \u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u5b58\u5728\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u4e0a\u8a18\u306e\u3088\u3046\u306a<code>otelsql.Open<\/code>\u3057\u3066<code>sqlx.NewDb<\/code>\u3067\u30e9\u30c3\u30d7\u3059\u308b\u5b9f\u88c5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<h3 id=\"\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831\">\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831<\/h3>\n<p><figure class=\"figure-image figure-image-fotolife\" title=\"TODO\u767b\u9332\u6642\u306e\u30c8\u30ec\u30fc\u30b9\u306e\u4f8b\"><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170011.png\" width=\"800\" height=\"611\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><figcaption>TODO\u767b\u9332\u6642\u306e\u30c8\u30ec\u30fc\u30b9\u306e\u4f8b<\/figcaption><\/figure>\n<\/p>\n<ul>\n<li>db.Connect<\/li>\n<li>db.Ping<\/li>\n<li>db.Begin<\/li>\n<li>db.Query<\/li>\n<li>db.Exec<\/li>\n<li>db.Prepare<\/li>\n<li>stmt.Exec<\/li>\n<li>stmt.Query<\/li>\n<li>tx.Commit<\/li>\n<li>tx.Rollback<\/li>\n<\/ul>\n<p>\u306a\u3069\u306e\u64cd\u4f5c\u306b\u5bfe\u3057\u3066span\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u307b\u3068\u3093\u3069\u67d4\u8edf\u6027\u306f\u306a\u304f\u3001\u5909\u66f4\u53ef\u80fd\u306a\u306e\u306fspan\u3078\u306e\u5c5e\u6027\u306e\u8ffd\u52a0\u306a\u3069\u4e00\u90e8\u306e\u3082\u306e\u306b\u9650\u3089\u308c\u307e\u3059\u3002<br \/>\n\u5b9f\u884c\u3055\u308c\u305fstatement\u306f <code>db.statement<\/code> \u3068\u3057\u3066Span\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002Prepare\u3055\u308c\u305fstatement\u306e\u5834\u5408\u3082\u540c\u69d8\u3067\u3042\u308a\u3001\uff08\u9069\u5207\u306b\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u3092\u5229\u7528\u3057\u3066\u3044\u308c\u3070\uff09\u5165\u529b\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u610f\u56f3\u305b\u305aSpan\u306b\u542b\u307e\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u53d6\u5f97\u53ef\u80fd\u306a\u5834\u5408\u306b\u306f<code>rows_affected<\/code> \u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u306e\u304c\u7279\u5fb4\u7684\u3067\u3057\u305f\u3002<\/p>\n<p>\u30af\u30a8\u30ea\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u6a5f\u80fd\u306f\u63a2\u3057\u305f\u9650\u308a\u3067\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u5fc5\u8981\u3067\u3042\u308c\u3070\u81ea\u8eab\u3067span\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"2-githubcomXSAMotelsql\">2. github.com\/XSAM\/otelsql<\/h2>\n<p>\u3053\u306e\u5b9f\u88c5\u306f\u5143\u3005opentelemetry-go-contrib\u306b\u8ca2\u732e\u3055\u308c\u3088\u3046\u3068\u3057\u3066\u3044\u305f\u3082\u306e\u304c\u3001\u7d50\u679c\u7684\u306b\u53d6\u308a\u8fbc\u307e\u308c\u305a\u72ec\u81ea\u306b\u30db\u30b9\u30c8\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u3002<br \/>\n<iframe src=\"https:\/\/hatenablog-parts.com\/embed?url=https%3A%2F%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-go-contrib%2Fpull%2F505\" title=\"Add tracing instrumentation for database\/sql by XSAM \u00b7 Pull Request #505 \u00b7 open-telemetry\/opentelemetry-go-contrib\" class=\"embed-card embed-webcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 155px; max-width: 500px; margin: 10px 0px;\" loading=\"lazy\"><\/iframe><\/p>\n<p><a target=\"_blank\" href=\"https:\/\/github.com\/XSAM\/otelsql?tab=readme-ov-file#why-port-this\">https:\/\/github.com\/XSAM\/otelsql?tab=readme-ov-file#why-port-this<\/a><\/p>\n<blockquote>\n<p>Based on this comment, OpenTelemetry SIG team like to see broader usage and community consensus on an approach before they commit to the level of support that would be required of a package in contrib. But it is painful for users without a stable version, and they have to use replacement in go.mod to use this instrumentation.<\/p>\n<\/blockquote>\n<p>2025\/9\u6642\u70b9\u3067Star\u6570\u306f\u3053\u306e\u4e2d\u3067\u306f\u6700\u3082\u591a\u304f356\u3067\u3042\u308a\u3001\u73fe\u5728\u3082XSAM\u3055\u3093\u304c\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3092\u7d9a\u3051\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3 id=\"\u8a08\u88c5\u65b9\u6cd5-1\">\u8a08\u88c5\u65b9\u6cd5<\/h3>\n<p>otelsql\u3092\u4f7f\u3063\u3066\u7279\u5b9a\u306edriver\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092Open\u3057\u307e\u3059\u3002<code>otelsql.WithAttributes<\/code> \u3067Span\u306b\u8ffd\u52a0\u3067\u4ed8\u4e0e\u3059\u308b\u5c5e\u6027\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u4f8b\u3067\u306fDBSystem\u3092MySQL\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">db, err := otelsql.Open(<span class=\"synConstant\">\"mysql\"<\/span>, dsn,\n    otelsql.WithAttributes(semconv.DBSystemNameMySQL),\n)\n<span class=\"synStatement\">if<\/span> err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> fmt.Errorf(<span class=\"synConstant\">\"failed to open database: %w\"<\/span>, err)\n}\n<span class=\"synStatement\">defer<\/span> db.Close()\n\ntodoService := NewTodoService(sqlx.NewDb(db, <span class=\"synConstant\">\"mysql\"<\/span>))\n<\/pre>\n<h3 id=\"\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831-1\">\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831<\/h3>\n<p><figure class=\"figure-image figure-image-fotolife\" title=\"TODO\u767b\u9332\u6642\u306e\u30c8\u30ec\u30fc\u30b9\u306e\u4f8b\"><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170034.png\" width=\"800\" height=\"622\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><figcaption>TODO\u767b\u9332\u6642\u306e\u30c8\u30ec\u30fc\u30b9\u306e\u4f8b<\/figcaption><\/figure>\n<\/p>\n<p>\u591a\u304f\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u5bfe\u3057\u3066span\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>sql.connector.connect<\/li>\n<li>sql.conn.reset_session<\/li>\n<li>sql.conn.exec<\/li>\n<li>sql.conn.query<\/li>\n<li>sql.conn.prepare<\/li>\n<li>sql.conn.begin_tx<\/li>\n<li>sql.conn.commit<\/li>\n<li>sql.conn.rollback<\/li>\n<li>sql.stmt.exec<\/li>\n<li>sql.stmt.query<\/li>\n<li>sql.rows<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u9001\u4fe1\u3059\u308bspan\u3092\u3088\u308a\u7d30\u304b\u304f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u8a73\u3057\u304f\u306f <code>otelsql.SpanOptions<\/code> \u3092\u53c2\u7167\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n<a target=\"_blank\" href=\"https:\/\/github.com\/XSAM\/otelsql\/blob\/7ca825674bad2598e7e78b502986d3ed27ca0337\/config.go#L107-L151\">https:\/\/github.com\/XSAM\/otelsql\/blob\/7ca825674bad2598e7e78b502986d3ed27ca0337\/config.go#L107-L151<\/a><\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u4ee5\u4e0b\u306espan\u306f\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li>sql.conn.ping<\/li>\n<li>sql.rows.next<\/li>\n<\/ul>\n<p>\u7279\u306bRows.Next\u306f\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u306bspan\u3082\u5927\u91cf\u306b\u4f5c\u6210\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u6709\u52b9\u5316\u306f\u614e\u91cd\u306b\u691c\u8a0e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3055\u308c\u308bstatement\u306f <code>db.statement<\/code> \u3068\u3057\u3066Span\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059<a target=\"_blank\" href=\"#f-f0dd902e\" id=\"fn-f0dd902e\" name=\"fn-f0dd902e\" title=\"\u5b9f\u969b\u306b\u306f OTEL_SEMCONV_STABILITY_OPT_IN \u3068\u3044\u3046\u74b0\u5883\u5909\u6570\u3067\u540d\u524d\u3092\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 https:\/\/pkg.go.dev\/github.com\/XSAM\/otelsql#readme-trace-semantic-convention-stability\">*5<\/a>\u3002Prepare\u3055\u308c\u305fstatement\u306e\u5834\u5408\u3082\u540c\u69d8\u3067\u3042\u308a\u3001\uff08\u9069\u5207\u306b\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u3092\u5229\u7528\u3057\u3066\u3044\u308c\u3070\uff09\u5165\u529b\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u610f\u56f3\u305b\u305aSpan\u306b\u542b\u307e\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30af\u30a8\u30ea\u306b\u52a0\u3048\u3066\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u81ea\u8eab\u3067span\u306b\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e <code>AttributeGetter<\/code> \u3092\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<a target=\"_blank\" href=\"https:\/\/pkg.go.dev\/github.com\/XSAM\/otelsql#AttributesGetter\">https:\/\/pkg.go.dev\/github.com\/XSAM\/otelsql#AttributesGetter<\/a><\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\"><span class=\"synStatement\">func<\/span> attributeGetter(ctx context.Context, method otelsql.Method, query <span class=\"synType\">string<\/span>, args []driver.NamedValue) []attribute.KeyValue {\n    <span class=\"synStatement\">if<\/span> <span class=\"synStatement\">len<\/span>(args) == <span class=\"synConstant\">0<\/span> {\n        <span class=\"synStatement\">return<\/span> <span class=\"synStatement\">nil<\/span>\n    }\n    attrs := <span class=\"synStatement\">make<\/span>([]attribute.KeyValue, <span class=\"synStatement\">len<\/span>(args))\n    <span class=\"synStatement\">for<\/span> i, arg := <span class=\"synStatement\">range<\/span> args {\n        argName := arg.Name\n        <span class=\"synStatement\">if<\/span> argName == <span class=\"synConstant\">\"\"<\/span> {\n            argName = strconv.Itoa(arg.Ordinal)\n        }\n        attrs[i] = semconv.DBQueryParameter(argName, fmt.Sprintf(<span class=\"synConstant\">\"%v\"<\/span>, arg.Value))\n    }\n    <span class=\"synStatement\">return<\/span> attrs\n}\n<\/pre>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">db, err := otelsql.Open(<span class=\"synConstant\">\"mysql\"<\/span>, dsn,\n    otelsql.WithAttributesGetter(attributeGetter),\n)\n<\/pre>\n<p><figure class=\"figure-image figure-image-fotolife\" title=\"\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092span\u306b\u8ffd\u52a0\u3059\u308b\u4f8b\"><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170016.png\" width=\"800\" height=\"291\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><figcaption>\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092span\u306b\u8ffd\u52a0\u3059\u308b\u4f8b<\/figcaption><\/figure>\n<\/p>\n<p><code>driver.NamedValue<\/code> \u306e <code>Name<\/code> \u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u540d\u524d\u4ed8\u304d\u30d1\u30e9\u30e1\u30fc\u30bf\uff08<code>sql.Named<\/code>\uff09\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u305d\u306e\u540d\u524d\u304c\u5165\u308a\u307e\u3059\u3002\u3053\u308c\u306f <code>jmoiron\/sqlx<\/code>\u306e <code>Named*<\/code> \u7cfb\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u6a5f\u80fd\u3068\u306f\u7570\u306a\u308b\u3082\u306e\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nMySQL\u3067\u306f\u540d\u524d\u4ed8\u304d\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044<a target=\"_blank\" href=\"#f-20dc3931\" id=\"fn-20dc3931\" name=\"fn-20dc3931\" title=\"https:\/\/github.com\/go-sql-driver\/mysql\/issues\/561\">*6<\/a>\u305f\u3081\u3001<code>sql.Named<\/code> \u3092\u4f7f\u3046\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001<code>driver.NamedValue.Name<\/code> \u3092\u4f7f\u3063\u3066\u7279\u5b9a\u306e\u540d\u524d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\uff08\u4f8b\u3048\u3070 <code>password<\/code> \uff09\u3060\u3051\u306f\u5024\u3092\u30de\u30b9\u30af\u3059\u308b\u3001\u3068\u3044\u3063\u305f\u5b9f\u88c5\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h3 id=\"\u6ce8\u610f\u70b9\">\u6ce8\u610f\u70b9<\/h3>\n<p>go-sql-driver\/mysql \u306f\u5185\u90e8\u3067 <code>driver.ErrSkip<\/code> \u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001github.com\/XSAM\/otelsql \u306f\u3053\u308c\u3092\u30a8\u30e9\u30fc\u3068\u3057\u3066Span\u306b\u8a18\u9332\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u6b63\u5e38\u306a\u6319\u52d5\u306e\u4e2d\u3067\u547c\u3073\u51fa\u3055\u308c\u3046\u308b\u30a8\u30e9\u30fc\u3067\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3092\u30a8\u30e9\u30fc\u3068\u3057\u3066\u8a18\u9332\u3059\u308b\u3068\u771f\u306b\u91cd\u8981\u306a\u30a8\u30e9\u30fc\u3092\u898b\u9003\u3057\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><figure class=\"figure-image figure-image-fotolife\" title=\"DisableErrSkip: false\u306e\u5834\u5408\u306b\u30a8\u30e9\u30fc\u3068\u306a\u308b\u4f8b\"><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170020.png\" width=\"800\" height=\"457\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><figcaption>DisableErrSkip: false\u306e\u5834\u5408\u306b\u30a8\u30e9\u30fc\u3068\u306a\u308b\u4f8b<\/figcaption><\/figure>\n<\/p>\n<p><code>otelsql.SpanOptions.DisableErrSkip<\/code> \u3092 <code>true<\/code> \u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3053\u306e\u6319\u52d5\u3092\u7121\u52b9\u5316\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4ed6\u306eDBMS\u30c9\u30e9\u30a4\u30d0\u3067\u3082\u540c\u69d8\u306e\u554f\u984c\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">db, err := otelsql.Open(<span class=\"synConstant\">\"mysql\"<\/span>, dsn,\n    otelsql.WithAttributes(semconv.DBSystemNameMySQL),\n    otelsql.WithSpanOptions(otelsql.SpanOptions{\n        DisableErrSkip: <span class=\"synStatement\">true<\/span>,\n    }),\n)\n<\/pre>\n<h2 id=\"3-gonhatiootelsql\">3. go.nhat.io\/otelsql<\/h2>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u4ee5\u4e0b\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><iframe src=\"https:\/\/hatenablog-parts.com\/embed?url=https%3A%2F%2Fgithub.com%2Fnhatthm%2Fotelsql\" title=\"GitHub - nhatthm\/otelsql: OpenTelemetry SQL database driver wrapper for Go\" class=\"embed-card embed-webcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 155px; max-width: 500px; margin: 10px 0px;\" loading=\"lazy\"><\/iframe><\/p>\n<p>\u4eca\u56de\u691c\u8a0e\u306b\u4e0a\u3052\u305f\u3082\u306e\u306e\u4e2d\u3067\u306f\u6700\u3082Star\u6570\u304c\u5c11\u306a\u304f\u30012025\/9\u6642\u70b9\u3067119\u3067\u3057\u305f\u3002dependabot\u306b\u3088\u308b\u66f4\u65b0\u4ee5\u5916\u306e\u30b3\u30df\u30c3\u30c8\u306f2025\/4\u306b\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u304c\u7a4d\u6975\u7684\u306b\u6a5f\u80fd\u958b\u767a\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<h3 id=\"\u8a08\u88c5\u65b9\u6cd5-2\">\u8a08\u88c5\u65b9\u6cd5<\/h3>\n<p>\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f <code>otelsql.Register<\/code> \u3092\u4f7f\u3063\u3066\u65b0\u3057\u3044\u30c9\u30e9\u30a4\u30d0\u540d\u3092\u767b\u9332\u3057\u3001\u305d\u306e\u30c9\u30e9\u30a4\u30d0\u540d\u3092\u4f7f\u3063\u3066 <code>sql.Open<\/code> \u3057\u307e\u3059\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">driverName, err := otelsql.Register(<span class=\"synConstant\">\"mysql\"<\/span>,\n    otelsql.WithSystem(semconv.DBSystemNameMySQL),\n)\n<span class=\"synStatement\">if<\/span> err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> fmt.Errorf(<span class=\"synConstant\">\"failed to register otelsql driver: %w\"<\/span>, err)\n}\ndb, err := sql.Open(driverName, dsn)\n<span class=\"synStatement\">if<\/span> err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> fmt.Errorf(<span class=\"synConstant\">\"failed to open database: %w\"<\/span>, err)\n}\n<span class=\"synStatement\">defer<\/span> db.Close()\n\ntodoService := NewTodoService(sqlx.NewDb(db, <span class=\"synConstant\">\"mysql\"<\/span>))\n<\/pre>\n<p>sqlx\u3092\u4f7f\u3046\u5834\u5408\u3001 <code>sqlx.Open<\/code> \u3092\u4f7f\u3063\u3066\u306f\u306a\u3089\u306a\u3044\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306fsqlx\u304c\u30c9\u30e9\u30a4\u30d0\u540d\u3092\u5143\u306b <code>Named*<\/code> \u7cfb\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u4f7f\u3046\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u3092\u6c7a\u5b9a\u3059\u308b\u305f\u3081\u3001\u5229\u7528\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u7570\u306a\u308b\u30c9\u30e9\u30a4\u30d0\u540d\u3092\u6307\u5b9a\u3057\u305f\u3068\u304d\u306b\u6b63\u3057\u304f\u52d5\u4f5c\u3057\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3067\u3059((github.com\/XSAM\/otelsql\u306b\u3082driver\u3092<a target=\"_blank\" href=\"https:\/\/pkg.go.dev\/github.com\/XSAM\/otelsql#Register\">Register<\/a>\u3059\u308b\u95a2\u6570\u304c\u3042\u308a\u3001\u3053\u308c\u3092\u4f7f\u3046\u5834\u5408\u306f\u540c\u69d8\u306e\u554f\u984c\u3092\u8e0f\u3080\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002)\u3002<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/github.com\/nhatthm\/otelsql?tab=readme-ov-file#jmoironsqlx\">https:\/\/github.com\/nhatthm\/otelsql?tab=readme-ov-file#jmoironsqlx<\/a><\/p>\n<blockquote>\n<p>Do not use the <code>sqlx.Open<\/code> and <code>sqlx.Connect<\/code> methods. <code>jmoiron\/sqlx<\/code> uses the driver name to figure out which database is being used. It uses this knowledge to convert named queries to the correct bind type (dollar sign, question mark) if named queries are not supported natively by the database.<\/p>\n<\/blockquote>\n<h3 id=\"\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831-2\">\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831<\/h3>\n<p><figure class=\"figure-image figure-image-fotolife\" title=\"TODO\u767b\u9332\u6642\u306e\u30c8\u30ec\u30fc\u30b9\u306e\u4f8b\"><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170025.png\" width=\"800\" height=\"608\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><figcaption>TODO\u767b\u9332\u6642\u306e\u30c8\u30ec\u30fc\u30b9\u306e\u4f8b<\/figcaption><\/figure>\n<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u4ee5\u4e0b\u306espan\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>sql:begin_transaction<\/li>\n<li>sql:exec<\/li>\n<li>sql:query<\/li>\n<li>sql:prepare<\/li>\n<li>sql:commit<\/li>\n<li>sql:rollback<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306espan\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6709\u52b9\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>sql:last_insert_id<\/li>\n<li>sql:rows_affected<\/li>\n<li>sql:ping<\/li>\n<li>sql:rows_close<\/li>\n<li>sql:rows_next<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u30af\u30a8\u30ea\u3084\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u304b\u3069\u3046\u304b\u3082\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>otelsql.WithQueryWithArgs()<\/code>\n<ul>\n<li>\u30af\u30a8\u30ea\u3068\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b<\/li>\n<\/ul>\n<\/li>\n<li><code>otelsql.WithQueryWithoutArgs()<\/code>\n<ul>\n<li>\u30af\u30a8\u30ea\u306e\u307f\u3092Span\u306b\u8ffd\u52a0<\/li>\n<\/ul>\n<\/li>\n<li><code>otelsql.WithQuery(func(ctx context.Context, query string, args []driver.NamedValue) []attribute.KeyValue)<\/code>\n<ul>\n<li>\u30af\u30a8\u30ea\u3068\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3092\u6307\u5b9a\u3059\u308b<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306f <code>WithQuery<\/code> \u3092\u4f7f\u3063\u3066 <code>otelsql.WithQueryWithArgs()<\/code> \u306b\u8fd1\u3044\u6319\u52d5\u3092\u5b9f\u88c5\u3057\u305f\u4f8b\u3067\u3059\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\"><span class=\"synStatement\">func<\/span> traceQuery(ctx context.Context, query <span class=\"synType\">string<\/span>, args []driver.NamedValue) []attribute.KeyValue {\n    attrs := <span class=\"synStatement\">make<\/span>([]attribute.KeyValue, <span class=\"synConstant\">0<\/span>, <span class=\"synStatement\">len<\/span>(args)+<span class=\"synConstant\">1<\/span>)\n    attrs = <span class=\"synStatement\">append<\/span>(attrs, semconv.DBQueryText(query))\n    <span class=\"synStatement\">for<\/span> _, arg := <span class=\"synStatement\">range<\/span> args {\n        argName := arg.Name\n        <span class=\"synStatement\">if<\/span> argName == <span class=\"synConstant\">\"\"<\/span> {\n            argName = strconv.Itoa(arg.Ordinal)\n        }\n        attrs = <span class=\"synStatement\">append<\/span>(attrs, semconv.DBQueryParameter(argName, fmt.Sprintf(<span class=\"synConstant\">\"%v\"<\/span>, arg.Value)))\n    }\n    <span class=\"synStatement\">return<\/span> attrs\n}\n<\/pre>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">driverName, err := otelsql.Register(<span class=\"synConstant\">\"mysql\"<\/span>,\n    otelsql.WithSystem(semconv.DBSystemNameMySQL),\n    otelsql.WithQuery(traceQuery),\n)\n<\/pre>\n<p><figure class=\"figure-image figure-image-fotolife\" title=\"\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092span\u306b\u8ffd\u52a0\u3059\u308b\u4f8b\"><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><img decoding=\"async\" src=\"https:\/\/cdn-ak.f.st-hatena.com\/images\/fotolife\/c\/cybozuinsideout\/20251006\/20251006170030.png\" width=\"800\" height=\"346\" loading=\"lazy\" title=\"\" class=\"hatena-fotolife\" itemprop=\"image\"\/><\/span><figcaption>\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092span\u306b\u8ffd\u52a0\u3059\u308b\u4f8b<\/figcaption><\/figure>\n<\/p>\n<h3 id=\"\u6ce8\u610f\u70b9-1\">\u6ce8\u610f\u70b9<\/h3>\n<p>github.com\/XSAM\/otelsql \u3068\u540c\u69d8\u306b\u3001MySQL\u30c9\u30e9\u30a4\u30d0\u306e <code>driver.ErrSkip<\/code> \u3092\u30a8\u30e9\u30fc\u3068\u3057\u3066Span\u306b\u8a18\u9332\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u69d8\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3053\u306e\u6319\u52d5\u3092\u7121\u52b9\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">driverName, err := otelsql.Register(<span class=\"synConstant\">\"mysql\"<\/span>,\n    otelsql.WithSystem(semconv.DBSystemNameMySQL),\n    otelsql.DisableErrSkip(),\n)\n<\/pre>\n<h2 id=\"\u3069\u308c\u3092\u9078\u3076\u3079\u304d\u304b\">\u3069\u308c\u3092\u9078\u3076\u3079\u304d\u304b<\/h2>\n<p>\u69d8\u3005\u306a\u89b3\u70b9\u304b\u3089\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u3044\u304f\u3064\u304b\u306e\u89b3\u70b9\u304b\u3089\u4eca\u56de\u306f github.com\/XSAM\/otelsql \u3092\u63a1\u7528\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u5b9f\u969b\u306b\u672c\u756a\u74b0\u5883\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u8a08\u88c5\u306b\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831\u304c\u8c4a\u5bcc\u3067\u3042\u308a\u3001span\u306e\u7c92\u5ea6\u3092\u7d30\u304b\u304f\u5236\u5fa1\u3067\u304d\u308b<\/li>\n<li>\u73fe\u5728\u3082\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u7d9a\u3051\u3089\u308c\u3066\u3044\u308b<\/li>\n<li>\u5fc5\u8981\u3067\u3042\u308c\u3070\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3067\u304d\u308b<\/li>\n<li><code>OTEL_SEMCONV_STABILITY_OPT_IN<\/code> \u74b0\u5883\u5909\u6570\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b<a target=\"_blank\" href=\"#f-722d9c35\" id=\"fn-722d9c35\" name=\"fn-722d9c35\" title=\"semconv\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u66f4\u65b0\u6642\u306b\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u95a2\u3059\u308b\u4ed5\u69d8\u5909\u66f4\u306a\u3069\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u3001\u79fb\u884c\u6642\u671f\u306b\u306f\u4e21\u65b9\u306e\u5024\u3092\u51fa\u529b\u3057\u3066\u79fb\u884c\u671f\u9593\u3092\u8a2d\u3051\u3089\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3079\u304d\u3067\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u6c7a\u3081\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u4eca\u56de\u7528\u3044\u3066\u3044\u308b database \u306b\u95a2\u3059\u308b\u5909\u66f4\u3082\u3042\u308a\u3001\u3053\u306e\u74b0\u5883\u5909\u6570\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3067\u65e7\u6765\u306esemconv\u3092\u4f7f\u3063\u3066\u3044\u308b\u30b7\u30b9\u30c6\u30e0\u306b\u3082\u3001\u65b0\u3057\u3044semconv\u3092\u4f7f\u3063\u3066\u3044\u308b\u30b7\u30b9\u30c6\u30e0\u306b\u3082\u5bfe\u5fdc\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\">*7<\/a>\u3002<\/li>\n<\/ul>\n<p>\u30c1\u30fc\u30e0\u306b\u3088\u3063\u3066\u8981\u4ef6\u306f\u7570\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4e57\u308a\u63db\u3048\u304c\u975e\u5e38\u306b\u9ad8\u30b3\u30b9\u30c8\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3082\u7121\u3044\u3068\u601d\u3046\u306e\u3067\u3001\u6c17\u306b\u5165\u3063\u305f\u3082\u306e\u63a1\u7528\u3057\u3066\u307f\u3066\u3082\u826f\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2 id=\"\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306e\u6ce8\u610f\u70b9\">\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306e\u6ce8\u610f\u70b9<\/h2>\n<p>\u6a5f\u80fd\u3068\u3057\u3066\u5b9f\u73fe\u306f\u53ef\u80fd\u306a\u3082\u306e\u306e\u3001\u3069\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\u3082\u6709\u52b9\u5316\u3057\u3066\u3088\u3044\u3082\u306e\u3067\u306f\u306a\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u6ce8\u610f\u70b9\u3092\u6319\u3052\u307e\u3059\u3002<\/p>\n<h3 id=\"\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30de\u30b9\u30ad\u30f3\u30b0\u3084\u9078\u629e\u7684\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\">\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30de\u30b9\u30ad\u30f3\u30b0\u3084\u9078\u629e\u7684\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0<\/h3>\n<p>\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u5834\u5408\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u306e\u6a5f\u5bc6\u60c5\u5831\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u3092\u9632\u3050\u305f\u3081\u306b\u306f\u3001 <code>AttributeGetter<\/code> \u3068\u3057\u3066\u6e21\u3059\u95a2\u6570\u306e\u4e2d\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u9078\u629e\u7684\u306b\u8ffd\u52a0\u3057\u305f\u308a\u3001\u30de\u30b9\u30ad\u30f3\u30b0\u3057\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u524d\u8ff0\u3057\u305f\u3088\u3046\u306b\u3001Go\u306eMySQL\u30c9\u30e9\u30a4\u30d0\u306f\u540d\u524d\u3064\u304d\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u30af\u30a8\u30ea\u672c\u4f53\u3092\u89e3\u6790\u3057\u305f\u308a\u3057\u306a\u3044\u304b\u304e\u308a\u3001\u3069\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u6a5f\u5bc6\u60c5\u5831\u3067\u3042\u308b\u304b\u3092\u7279\u5b9a\u3059\u308b\u3053\u3068\u306f\u56f0\u96e3\u3067\u3059\u3002\u3088\u3063\u3066\u3001\u305d\u306e\u307e\u307e\u4f7f\u3046\u9650\u308a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306f\u5168\u3066\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u304b\u3001\u5168\u304f\u8ffd\u52a0\u3057\u306a\u3044\u304b\u306e\u3069\u3061\u3089\u304b\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><code>AttributeGetter<\/code> \u304c <code>context.Context<\/code> \u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304b\u3089\u3001\u4f55\u3089\u304b\u306e\u30c8\u30ec\u30fc\u30b9\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8\u3092\u542b\u3081\u3066\u30af\u30a8\u30ea\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30b9\u30d1\u30f3\u3078\u306e\u8ffd\u52a0\u3092\u53d6\u6368\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u306f\u3044\u307e\u3059\u304c\u3001\u307e\u3060\u826f\u3044\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306f\u601d\u3044\u3064\u3044\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<h3 id=\"sqlx\u306e-Named-\u3067\u8907\u6570\u884c\u306eINSERT\u3092\u3059\u308b\u5834\u5408\">sqlx\u306e <code>Named*<\/code> \u3067\u8907\u6570\u884c\u306eINSERT\u3092\u3059\u308b\u5834\u5408<\/h3>\n<p><code>sqlx<\/code> \u306e <code>NamedExec<\/code> \u306f\u8907\u6570\u884c\u306eINSERT\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">todoMaps := <span class=\"synStatement\">make<\/span>([]<span class=\"synType\">map<\/span>[<span class=\"synType\">string<\/span>]any, <span class=\"synStatement\">len<\/span>(todos))\n<span class=\"synStatement\">for<\/span> i, todo := <span class=\"synStatement\">range<\/span> todos {\n    todoMaps[i] = <span class=\"synType\">map<\/span>[<span class=\"synType\">string<\/span>]any{\n        <span class=\"synConstant\">\"title\"<\/span>:       todo.Title,\n        <span class=\"synConstant\">\"description\"<\/span>: todo.Description,\n    }\n}\nquery := <span class=\"synConstant\">`INSERT INTO todos (title, description, created_at)<\/span>\n<span class=\"synConstant\">VALUES (:title, :description, NOW())`<\/span>\nresult, err := tx.NamedExecContext(ctx, query, todoMaps)\n<span class=\"synStatement\">if<\/span> err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> <span class=\"synConstant\">0<\/span>, fmt.Errorf(<span class=\"synConstant\">\"failed to insert todos: %w\"<\/span>, err)\n}\n<\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001 <code>todoMaps<\/code> \u306e\u8981\u7d20\u6570\u306b\u5fdc\u3058\u3066 <code>?<\/code> \u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u304c\u5c55\u958b\u3055\u308c\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070 <code>todoMaps<\/code> \u304c3\u4ef6\u306e\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u3044\u308c\u3070\u3001 <code>query<\/code> \u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"code lang-sql\" data-lang=\"sql\" data-unlink=\"\"><span class=\"synStatement\">INSERT<\/span> <span class=\"synSpecial\">INTO<\/span> todos (title, description, created_at)\n<span class=\"synSpecial\">VALUES<\/span> (?, ?, NOW()), (?, ?, NOW()), (?, ?, NOW())\n<\/pre>\n<p>\u672c\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3092\u4f7f\u3046\u3068\u3001 <code>db.statement<\/code> \u306b\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30af\u30a8\u30ea\u304c\u8ffd\u52a0\u3055\u308c\u3001\u3055\u3089\u306b6\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304cSpan\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3088\u3063\u3066\u591a\u6570\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u3001XSAM\/otelsql\u3084go.nhat.io\/otelsql\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3092Span\u306b\u8ffd\u52a0\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3068\u3001\u975e\u5e38\u306b\u591a\u304f\u306e\u5c5e\u6027\u304cSpan\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3053\u308c\u3092\u9632\u3050\u305f\u3081\u306b\u306f\u3001 <code>AttributeGetter<\/code> \u3084 <code>WithQuery<\/code> \u3067\u6e21\u3059\u95a2\u6570\u306e\u4e2d\u3067\u8a18\u9332\u3059\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6570\u3092\u5236\u9650\u3059\u308b\u306a\u3069\u306e\u5de5\u592b\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h3 id=\"sqlx\u306e-sqlxIn-\u3092\u4f7f\u3046\u5834\u5408\">sqlx\u306e <code>sqlx.In<\/code> \u3092\u4f7f\u3046\u5834\u5408<\/h3>\n<p><code>sqlx.In<\/code> \u3092\u4f7f\u3046\u3068\u3001SQL\u30af\u30a8\u30ea\u306e\u4e2d\u306b <code>?<\/code> \u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u304c\u8907\u6570\u542b\u307e\u308c\u308b\u5834\u5408\u306b\u305d\u308c\u3092\u5c55\u958b\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"code lang-go\" data-lang=\"go\" data-unlink=\"\">query, args, err := sqlx.In(<span class=\"synConstant\">\"SELECT id, title, description, created_at FROM todos WHERE id IN (?) ORDER BY created_at DESC\"<\/span>, ids)\n<span class=\"synStatement\">if<\/span> err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> <span class=\"synStatement\">nil<\/span>, fmt.Errorf(<span class=\"synConstant\">\"failed to build IN query: %w\"<\/span>, err)\n}\n<span class=\"synStatement\">var<\/span> todos []Todo\n<span class=\"synStatement\">if<\/span> err := tx.SelectContext(ctx, &amp;todos, query, args...); err != <span class=\"synStatement\">nil<\/span> {\n    <span class=\"synStatement\">return<\/span> <span class=\"synStatement\">nil<\/span>, fmt.Errorf(<span class=\"synConstant\">\"failed to get todos: %w\"<\/span>, err)\n}\n<\/pre>\n<p>\u3053\u306e\u5834\u5408 <code>sqlx.In<\/code> \u306f <code>ids<\/code> \u306e\u8981\u7d20\u6570\u306b\u5fdc\u3058\u3066 <code>?<\/code> \u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u3092\u5c55\u958b\u3057\u3001 <code>args<\/code> \u306b\u305d\u306e\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070 <code>ids<\/code> \u304c <code>[1, 2, 3]<\/code> \u3067\u3042\u308c\u3070\u3001 <code>query<\/code> \u306f <code>SELECT id, title, description, created_at FROM todos WHERE id IN (?,?,?) ORDER BY created_at DESC<\/code> \u3068\u306a\u308a\u3001 <code>args<\/code> \u306f <code>1, 2, 3<\/code> \u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d0\u30c3\u30c1\u30a4\u30f3\u30b5\u30fc\u30c8\u3059\u308b\u5834\u5408\u3068\u540c\u69d8\u306b\u3001 <code>sqlx.In<\/code> \u3092\u4f7f\u3046\u30b1\u30fc\u30b9\u3067\u3082\u591a\u6570\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304cspan\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h2 id=\"\u307e\u3068\u3081\">\u307e\u3068\u3081<\/h2>\n<p>CloudPlatform\u90e8\u3067\u30a4\u30f3\u30bf\u30fc\u30f3\u30b7\u30c3\u30d7\u3092\u958b\u50ac\u3057\u3001\u5b66\u751f\u306e\u65b9\u306bGo\u8a00\u8a9e\u306eOpenTelemetry\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6bd4\u8f03\u691c\u8a0e\u3057\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002\u305d\u306e\u6210\u679c\u3092\u5143\u306b\u3001\u6700\u7d42\u7684\u306b\u6211\u3005\u306e\u30cb\u30fc\u30ba\u306b\u6700\u3082\u5408\u81f4\u3057\u3066\u3044\u308b\u3068\u8003\u3048\u3089\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u63a1\u7528\u3059\u308b\u3053\u3068\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u672c\u7b4b\u304b\u3089\u5916\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u7d39\u4ecb\u3057\u5207\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u67f3\u7530\u3055\u3093\u306b\u306f\u5b9f\u969b\u306b\u7a3c\u50cd\u3057\u3066\u3044\u308b\u9ad8\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306a\u30b5\u30fc\u30d3\u30b9\u306b\u5bfe\u3057\u3066\u8a08\u88c5\u3092\u884c\u3063\u3066\u3044\u305f\u3060\u304d\u5927\u5909\u52a9\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>CloudPlatform\u90e8\u3067\u306f\u5f15\u304d\u7d9a\u304d\u904b\u7528\u3057\u3084\u3059\u3044\u30b5\u30fc\u30d3\u30b9\u306e\u5b9f\u73fe\u3092\u76ee\u6307\u3057\u3001\u30aa\u30d6\u30b6\u30fc\u30d0\u30d3\u30ea\u30c6\u30a3\u306e\u5411\u4e0a\u306b\u3082\u7a4d\u6975\u7684\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304d\u307e\u3059\u3002\u8208\u5473\u304c\u3042\u308c\u3070\u662f\u975e\u4ee5\u4e0b\u306e\u63a1\u7528\u60c5\u5831\u3082\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><iframe src=\"https:\/\/hatenablog-parts.com\/embed?url=https%3A%2F%2Fcybozu.co.jp%2Frecruit%2Fentry%2Fcareer%2FCloud-Platform.html\" title=\"\u30af\u30e9\u30a6\u30c9\u57fa\u76e4\u30a8\u30f3\u30b8\u30cb\u30a2\uff08Cloud Platform\uff09\u30ad\u30e3\u30ea\u30a2\u63a1\u7528 \u52df\u96c6\u8981\u9805 | \u63a1\u7528\u60c5\u5831 | \u30b5\u30a4\u30dc\u30a6\u30ba\u682a\u5f0f\u4f1a\u793e\" class=\"embed-card embed-webcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 155px; max-width: 500px; margin: 10px 0px;\" loading=\"lazy\"><\/iframe><\/p>\n<p>\u307e\u305f\u3001\u6628\u5e74\u306e\u30a4\u30f3\u30bf\u30fc\u30f3\u30b7\u30c3\u30d7\u306e\u69d8\u5b50\u3084\u53d6\u308a\u7d44\u3093\u3060\u8ab2\u984c\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u304b\u3089\u3054\u89a7\u9802\u3051\u307e\u3059\u3002\u3054\u8208\u5473\u3042\u308c\u3070\u662f\u975e\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<hr\/>\n<\/div>\n<p><script>(function(d, s, id) {\n  var js, fjs = d.getElementsByTagName(s)[0];\n  if (d.getElementById(id)) return;\n  js = d.createElement(s); js.id = id;\n  js.src = \"\/\/connect.facebook.net\/ja_JP\/sdk.js#xfbml=1&version=v2.3\";\n  fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));<\/script><br \/>\n<br \/>\n<br \/><a href=\"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000\">\u5143\u306e\u8a18\u4e8b\u3092\u78ba\u8a8d\u3059\u308b <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u306f\u3058\u3081\u306b CloudPlatform\u90e8\u306epddg\u3067\u3059\u3002Go\u306b\u304a\u3051\u308bOpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u3001\u7279\u306bdatabase\/sql\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u3092\u884c\u3046\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u547c\u3079\u308b\u3082 [&hellip;]","protected":false},"author":1,"featured_media":8359,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-8358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-company-tec"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql - Cybozu Inside Out - \u30dd\u30b1\u30b3\u30f3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql - Cybozu Inside Out - \u30dd\u30b1\u30b3\u30f3\" \/>\n<meta property=\"og:description\" content=\"\u306f\u3058\u3081\u306b CloudPlatform\u90e8\u306epddg\u3067\u3059\u3002Go\u306b\u304a\u3051\u308bOpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u3001\u7279\u306bdatabase\/sql\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u3092\u884c\u3046\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u547c\u3079\u308b\u3082 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000\" \/>\n<meta property=\"og:site_name\" content=\"\u30dd\u30b1\u30b3\u30f3\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-06T10:54:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pokecon.jp\/job\/wp-content\/uploads\/2025\/10\/1759737640.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"info@pokecon.jp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"info@pokecon.jp\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"5\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/8358\\\/\"},\"author\":{\"name\":\"info@pokecon.jp\",\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/#\\\/schema\\\/person\\\/16c9f07b1ba984d165d9aee259bda997\"},\"headline\":\"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\\\/sql &#8211; Cybozu Inside Out\",\"datePublished\":\"2025-10-06T10:54:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/8358\\\/\"},\"wordCount\":399,\"image\":{\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/1759737640.png\",\"articleSection\":[\"\u4f01\u696d\u30c6\u30c3\u30af\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/8358\\\/\",\"url\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000\",\"name\":\"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\\\/sql - Cybozu Inside Out - \u30dd\u30b1\u30b3\u30f3\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/1759737640.png\",\"datePublished\":\"2025-10-06T10:54:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/#\\\/schema\\\/person\\\/16c9f07b1ba984d165d9aee259bda997\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#primaryimage\",\"url\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/1759737640.png\",\"contentUrl\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/1759737640.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.cybozu.io\\\/entry\\\/2025\\\/10\\\/06\\\/170000#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\\\/sql &#8211; Cybozu Inside Out\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/#website\",\"url\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/\",\"name\":\"\u30dd\u30b1\u30b3\u30f3\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/#\\\/schema\\\/person\\\/16c9f07b1ba984d165d9aee259bda997\",\"name\":\"info@pokecon.jp\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2b0549cd9f7907c092ca5fbb283baf72337f235726e4b46fa39ec0b701ac2fe2?s=96&d=wavatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2b0549cd9f7907c092ca5fbb283baf72337f235726e4b46fa39ec0b701ac2fe2?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2b0549cd9f7907c092ca5fbb283baf72337f235726e4b46fa39ec0b701ac2fe2?s=96&d=wavatar&r=g\",\"caption\":\"info@pokecon.jp\"},\"url\":\"https:\\\/\\\/pokecon.jp\\\/job\\\/author\\\/infopokecon-jp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql - Cybozu Inside Out - \u30dd\u30b1\u30b3\u30f3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000","og_locale":"ja_JP","og_type":"article","og_title":"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql - Cybozu Inside Out - \u30dd\u30b1\u30b3\u30f3","og_description":"\u306f\u3058\u3081\u306b CloudPlatform\u90e8\u306epddg\u3067\u3059\u3002Go\u306b\u304a\u3051\u308bOpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u3001\u7279\u306bdatabase\/sql\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u3092\u884c\u3046\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u547c\u3079\u308b\u3082 [&hellip;]","og_url":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000","og_site_name":"\u30dd\u30b1\u30b3\u30f3","article_published_time":"2025-10-06T10:54:39+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/pokecon.jp\/job\/wp-content\/uploads\/2025\/10\/1759737640.png","type":"image\/png"}],"author":"info@pokecon.jp","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"info@pokecon.jp","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"5\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#article","isPartOf":{"@id":"https:\/\/pokecon.jp\/job\/8358\/"},"author":{"name":"info@pokecon.jp","@id":"https:\/\/pokecon.jp\/job\/#\/schema\/person\/16c9f07b1ba984d165d9aee259bda997"},"headline":"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql &#8211; Cybozu Inside Out","datePublished":"2025-10-06T10:54:39+00:00","mainEntityOfPage":{"@id":"https:\/\/pokecon.jp\/job\/8358\/"},"wordCount":399,"image":{"@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#primaryimage"},"thumbnailUrl":"https:\/\/pokecon.jp\/job\/wp-content\/uploads\/2025\/10\/1759737640.png","articleSection":["\u4f01\u696d\u30c6\u30c3\u30af"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/pokecon.jp\/job\/8358\/","url":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000","name":"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql - Cybozu Inside Out - \u30dd\u30b1\u30b3\u30f3","isPartOf":{"@id":"https:\/\/pokecon.jp\/job\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#primaryimage"},"image":{"@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#primaryimage"},"thumbnailUrl":"https:\/\/pokecon.jp\/job\/wp-content\/uploads\/2025\/10\/1759737640.png","datePublished":"2025-10-06T10:54:39+00:00","author":{"@id":"https:\/\/pokecon.jp\/job\/#\/schema\/person\/16c9f07b1ba984d165d9aee259bda997"},"breadcrumb":{"@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#primaryimage","url":"https:\/\/pokecon.jp\/job\/wp-content\/uploads\/2025\/10\/1759737640.png","contentUrl":"https:\/\/pokecon.jp\/job\/wp-content\/uploads\/2025\/10\/1759737640.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/blog.cybozu.io\/entry\/2025\/10\/06\/170000#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/pokecon.jp\/job\/"},{"@type":"ListItem","position":2,"name":"OpenTelemetry\u306e\u8a08\u88c5\u30e9\u30a4\u30d6\u30e9\u30ea\u6bd4\u8f03 for database\/sql &#8211; Cybozu Inside Out"}]},{"@type":"WebSite","@id":"https:\/\/pokecon.jp\/job\/#website","url":"https:\/\/pokecon.jp\/job\/","name":"\u30dd\u30b1\u30b3\u30f3","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pokecon.jp\/job\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/pokecon.jp\/job\/#\/schema\/person\/16c9f07b1ba984d165d9aee259bda997","name":"info@pokecon.jp","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/2b0549cd9f7907c092ca5fbb283baf72337f235726e4b46fa39ec0b701ac2fe2?s=96&d=wavatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2b0549cd9f7907c092ca5fbb283baf72337f235726e4b46fa39ec0b701ac2fe2?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2b0549cd9f7907c092ca5fbb283baf72337f235726e4b46fa39ec0b701ac2fe2?s=96&d=wavatar&r=g","caption":"info@pokecon.jp"},"url":"https:\/\/pokecon.jp\/job\/author\/infopokecon-jp\/"}]}},"_links":{"self":[{"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/posts\/8358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/comments?post=8358"}],"version-history":[{"count":1,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/posts\/8358\/revisions"}],"predecessor-version":[{"id":8360,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/posts\/8358\/revisions\/8360"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/media\/8359"}],"wp:attachment":[{"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/media?parent=8358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/categories?post=8358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pokecon.jp\/job\/wp-json\/wp\/v2\/tags?post=8358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}