[{"data":1,"prerenderedAt":2459},["ShallowReactive",2],{"\u002Ffeatures\u002Ftransformations\u002Freference-navigation":3,"\u002Ffeatures\u002Ftransformations\u002Freference":140},[4,8,28,38,52,70,74,78,88,98,102,106,110,114,118,122],{"title":5,"path":6,"stem":7},"Get started","\u002Ffeatures","features\u002Findex",{"title":9,"closed":10,"path":11,"stem":12,"children":13,"page":-1},"Traces",true,"\u002Ffeatures\u002Ftraces","features\u002F01.traces\u002Findex",[14,16,20,24],{"title":15,"path":11,"stem":12},"Introduction",{"title":17,"path":18,"stem":19},"Grouping & systems","\u002Ffeatures\u002Ftraces\u002Fgrouping","features\u002F01.traces\u002Fgrouping",{"title":21,"path":22,"stem":23},"Querying spans","\u002Ffeatures\u002Ftraces\u002Fquerying-spans","features\u002F01.traces\u002Fquerying-spans",{"title":25,"path":26,"stem":27},"Querying traces","\u002Ffeatures\u002Ftraces\u002Fquerying-traces","features\u002F01.traces\u002Fquerying-traces",{"title":29,"closed":10,"path":30,"stem":31,"children":32,"page":-1},"Logs","\u002Ffeatures\u002Flogs","features\u002F02.logs\u002Findex",[33,34],{"title":15,"path":30,"stem":31},{"title":35,"path":36,"stem":37},"Grouping rules","\u002Ffeatures\u002Flogs\u002Fgrouping","features\u002F02.logs\u002Fgrouping",{"title":39,"closed":10,"path":40,"stem":41,"children":42,"page":-1},"Metrics","\u002Ffeatures\u002Fmetrics","features\u002F03.metrics\u002Findex",[43,44,48],{"title":15,"path":40,"stem":41},{"title":45,"path":46,"stem":47},"Querying","\u002Ffeatures\u002Fmetrics\u002Fquerying","features\u002F03.metrics\u002F02.querying",{"title":49,"path":50,"stem":51},"PromQL compat","\u002Ffeatures\u002Fmetrics\u002Fpromql-compat","features\u002F03.metrics\u002F03.promql-compat",{"title":53,"closed":10,"path":54,"stem":55,"children":56,"page":-1},"Alerting","\u002Ffeatures\u002Falerting","features\u002F04.alerting\u002Findex",[57,58,62,66],{"title":15,"path":54,"stem":55},{"title":59,"path":60,"stem":61},"Error monitors","\u002Ffeatures\u002Falerting\u002Ferror-monitors","features\u002F04.alerting\u002Ferror-monitors",{"title":63,"path":64,"stem":65},"Metric monitors","\u002Ffeatures\u002Falerting\u002Fmetric-monitors","features\u002F04.alerting\u002Fmetric-monitors",{"title":67,"path":68,"stem":69},"Notifications","\u002Ffeatures\u002Falerting\u002Fnotifications","features\u002F04.alerting\u002Fnotifications",{"title":71,"path":72,"stem":73},"Searching","\u002Ffeatures\u002Fsearching","features\u002F04.searching",{"title":75,"path":76,"stem":77},"Chart Annotations","\u002Ffeatures\u002Fannotations","features\u002F05.annotations",{"title":79,"path":80,"stem":81,"children":82,"closed":10},"Dashboards","\u002Ffeatures\u002Fdashboards","features\u002F06.dashboards\u002F01.index",[83,84],{"title":79,"path":80,"stem":81},{"title":85,"path":86,"stem":87},"YAML Templates","\u002Ffeatures\u002Fdashboards\u002Fyaml","features\u002F06.dashboards\u002F02.yaml",{"title":89,"path":90,"stem":91,"children":92,"closed":10},"Transformations","\u002Ffeatures\u002Ftransformations","features\u002F07.transformations\u002F01.index",[93,94],{"title":15,"path":90,"stem":91},{"title":95,"path":96,"stem":97},"Reference","\u002Ffeatures\u002Ftransformations\u002Freference","features\u002F07.transformations\u002F02.reference",{"title":99,"path":100,"stem":101},"Service Graph","\u002Ffeatures\u002Fservice-graph","features\u002F08.service-graph",{"title":103,"path":104,"stem":105},"Grafana integration","\u002Ffeatures\u002Fgrafana","features\u002F09.grafana",{"title":107,"path":108,"stem":109},"Data fixtures","\u002Ffeatures\u002Ffixtures","features\u002F10.fixtures",{"title":111,"path":112,"stem":113},"JavaScript Source Maps","\u002Ffeatures\u002Fsourcemaps","features\u002F11.sourcemaps",{"title":115,"path":116,"stem":117},"MCP Server","\u002Ffeatures\u002Fmcp","features\u002F12.mcp",{"title":119,"path":120,"stem":121},"Observability as Code","\u002Ffeatures\u002Fobservability-as-code","features\u002F13.observability-as-code",{"title":123,"closed":10,"path":124,"stem":125,"children":126,"page":139},"SSO","\u002Ffeatures\u002Fsso","features\u002Fsso",[127,131,135],{"title":128,"path":129,"stem":130},"Google","\u002Ffeatures\u002Fsso\u002Fgoogle","features\u002Fsso\u002F01.google",{"title":132,"path":133,"stem":134},"Okta","\u002Ffeatures\u002Fsso\u002Fokta","features\u002Fsso\u002F02.okta",{"title":136,"path":137,"stem":138},"Keycloak","\u002Ffeatures\u002Fsso\u002Fkeycloak","features\u002Fsso\u002F03.keycloak",false,{"page":141,"surround":2454},{"id":142,"title":143,"body":144,"description":2442,"extension":2443,"image":2444,"meta":2445,"navigation":2451,"path":96,"seo":2452,"stem":97,"surround_disabled":139,"__hash__":2453},"features\u002Ffeatures\u002F07.transformations\u002F02.reference.md","Operations & Functions Reference",{"type":145,"value":146,"toc":2422},"minimark",[147,155,160,165,251,258,325,329,332,401,404,457,460,521,525,588,590,641,645,687,728,737,741,793,801,805,857,873,886,890,897,987,996,1000,1014,1068,1080,1088,1092,1103,1187,1192,1265,1268,1273,1276,1282,1285,1362,1365,1419,1422,1476,1479,1533,1536,1609,1612,1616,1632,1636,1641,1774,1778,1900,1904,2023,2027,2110,2114,2117,2179,2182,2224,2227,2291,2295,2399,2403,2418],[148,149,150,151,154],"p",{},"Complete reference for all transformation operation types and built-in functions. See ",[152,153,15],"a",{"href":90}," for an overview, scope rules, and common recipes.",[156,157,159],"h2",{"id":158},"operations","Operations",[161,162,164],"h3",{"id":163},"rename-attribute","Rename attribute",[166,167,172],"pre",{"className":168,"code":169,"language":170,"meta":171,"style":171},"language-yaml shiki shiki-themes github-light","name: Rename service to service_name\nscope: [spans, logs, events]\ntype: rename_attr\nold_key: service\nnew_key: service_name\n","yaml","",[173,174,175,192,218,229,240],"code",{"__ignoreMap":171},[176,177,180,184,188],"span",{"class":178,"line":179},"line",1,[176,181,183],{"class":182},"shJU0","name",[176,185,187],{"class":186},"sgsFI",": ",[176,189,191],{"class":190},"sYBdl","Rename service to service_name\n",[176,193,195,198,201,204,207,210,212,215],{"class":178,"line":194},2,[176,196,197],{"class":182},"scope",[176,199,200],{"class":186},": [",[176,202,203],{"class":190},"spans",[176,205,206],{"class":186},", ",[176,208,209],{"class":190},"logs",[176,211,206],{"class":186},[176,213,214],{"class":190},"events",[176,216,217],{"class":186},"]\n",[176,219,221,224,226],{"class":178,"line":220},3,[176,222,223],{"class":182},"type",[176,225,187],{"class":186},[176,227,228],{"class":190},"rename_attr\n",[176,230,232,235,237],{"class":178,"line":231},4,[176,233,234],{"class":182},"old_key",[176,236,187],{"class":186},[176,238,239],{"class":190},"service\n",[176,241,243,246,248],{"class":178,"line":242},5,[176,244,245],{"class":182},"new_key",[176,247,187],{"class":186},[176,249,250],{"class":190},"service_name\n",[148,252,253,254,257],{},"Set ",[173,255,256],{},"overwrite: true"," to overwrite the target attribute if it already exists:",[166,259,261],{"className":168,"code":260,"language":170,"meta":171,"style":171},"name: Rename service to service_name\nscope: [spans, logs, events]\ntype: rename_attr\nold_key: service\nnew_key: service_name\noverwrite: true\n",[173,262,263,271,289,297,305,313],{"__ignoreMap":171},[176,264,265,267,269],{"class":178,"line":179},[176,266,183],{"class":182},[176,268,187],{"class":186},[176,270,191],{"class":190},[176,272,273,275,277,279,281,283,285,287],{"class":178,"line":194},[176,274,197],{"class":182},[176,276,200],{"class":186},[176,278,203],{"class":190},[176,280,206],{"class":186},[176,282,209],{"class":190},[176,284,206],{"class":186},[176,286,214],{"class":190},[176,288,217],{"class":186},[176,290,291,293,295],{"class":178,"line":220},[176,292,223],{"class":182},[176,294,187],{"class":186},[176,296,228],{"class":190},[176,298,299,301,303],{"class":178,"line":231},[176,300,234],{"class":182},[176,302,187],{"class":186},[176,304,239],{"class":190},[176,306,307,309,311],{"class":178,"line":242},[176,308,245],{"class":182},[176,310,187],{"class":186},[176,312,250],{"class":190},[176,314,316,319,321],{"class":178,"line":315},6,[176,317,318],{"class":182},"overwrite",[176,320,187],{"class":186},[176,322,324],{"class":323},"sYu0t","true\n",[161,326,328],{"id":327},"delete-attributes","Delete attributes",[148,330,331],{},"By key list:",[166,333,335],{"className":168,"code":334,"language":170,"meta":171,"style":171},"name: Delete foo and bar\nscope: [spans, logs, events, datapoints]\ntype: delete_attrs\nkeys:\n  - foo\n  - bar\n",[173,336,337,346,369,378,386,394],{"__ignoreMap":171},[176,338,339,341,343],{"class":178,"line":179},[176,340,183],{"class":182},[176,342,187],{"class":186},[176,344,345],{"class":190},"Delete foo and bar\n",[176,347,348,350,352,354,356,358,360,362,364,367],{"class":178,"line":194},[176,349,197],{"class":182},[176,351,200],{"class":186},[176,353,203],{"class":190},[176,355,206],{"class":186},[176,357,209],{"class":190},[176,359,206],{"class":186},[176,361,214],{"class":190},[176,363,206],{"class":186},[176,365,366],{"class":190},"datapoints",[176,368,217],{"class":186},[176,370,371,373,375],{"class":178,"line":220},[176,372,223],{"class":182},[176,374,187],{"class":186},[176,376,377],{"class":190},"delete_attrs\n",[176,379,380,383],{"class":178,"line":231},[176,381,382],{"class":182},"keys",[176,384,385],{"class":186},":\n",[176,387,388,391],{"class":178,"line":242},[176,389,390],{"class":186},"  - ",[176,392,393],{"class":190},"foo\n",[176,395,396,398],{"class":178,"line":315},[176,397,390],{"class":186},[176,399,400],{"class":190},"bar\n",[148,402,403],{},"By regular expression:",[166,405,407],{"className":168,"code":406,"language":170,"meta":171,"style":171},"name: Delete foo and bar\nscope: [spans, logs, events, datapoints]\ntype: delete_attrs\nregexp: ^(foo|bar)$\n",[173,408,409,417,439,447],{"__ignoreMap":171},[176,410,411,413,415],{"class":178,"line":179},[176,412,183],{"class":182},[176,414,187],{"class":186},[176,416,345],{"class":190},[176,418,419,421,423,425,427,429,431,433,435,437],{"class":178,"line":194},[176,420,197],{"class":182},[176,422,200],{"class":186},[176,424,203],{"class":190},[176,426,206],{"class":186},[176,428,209],{"class":190},[176,430,206],{"class":186},[176,432,214],{"class":190},[176,434,206],{"class":186},[176,436,366],{"class":190},[176,438,217],{"class":186},[176,440,441,443,445],{"class":178,"line":220},[176,442,223],{"class":182},[176,444,187],{"class":186},[176,446,377],{"class":190},[176,448,449,452,454],{"class":178,"line":231},[176,450,451],{"class":182},"regexp",[176,453,187],{"class":186},[176,455,456],{"class":190},"^(foo|bar)$\n",[148,458,459],{},"Scoped to a specific metric:",[166,461,463],{"className":168,"code":462,"language":170,"meta":171,"style":171},"name: Delete foo and bar from my_metric\nscope: [datapoints]\ntype: delete_attrs\nkeys:\n  - foo\n  - bar\nif: metricName() == \"my_metric_name\"\n",[173,464,465,474,484,492,498,504,510],{"__ignoreMap":171},[176,466,467,469,471],{"class":178,"line":179},[176,468,183],{"class":182},[176,470,187],{"class":186},[176,472,473],{"class":190},"Delete foo and bar from my_metric\n",[176,475,476,478,480,482],{"class":178,"line":194},[176,477,197],{"class":182},[176,479,200],{"class":186},[176,481,366],{"class":190},[176,483,217],{"class":186},[176,485,486,488,490],{"class":178,"line":220},[176,487,223],{"class":182},[176,489,187],{"class":186},[176,491,377],{"class":190},[176,493,494,496],{"class":178,"line":231},[176,495,382],{"class":182},[176,497,385],{"class":186},[176,499,500,502],{"class":178,"line":242},[176,501,390],{"class":186},[176,503,393],{"class":190},[176,505,506,508],{"class":178,"line":315},[176,507,390],{"class":186},[176,509,400],{"class":190},[176,511,513,516,518],{"class":178,"line":512},7,[176,514,515],{"class":182},"if",[176,517,187],{"class":186},[176,519,520],{"class":190},"metricName() == \"my_metric_name\"\n",[161,522,524],{"id":523},"keep-attributes","Keep attributes",[166,526,528],{"className":168,"code":527,"language":170,"meta":171,"style":171},"name: Keep foo and bar\nscope: [spans, logs, events, datapoints]\ntype: keep_attrs\nkeys:\n  - foo\n  - bar\n",[173,529,530,539,561,570,576,582],{"__ignoreMap":171},[176,531,532,534,536],{"class":178,"line":179},[176,533,183],{"class":182},[176,535,187],{"class":186},[176,537,538],{"class":190},"Keep foo and bar\n",[176,540,541,543,545,547,549,551,553,555,557,559],{"class":178,"line":194},[176,542,197],{"class":182},[176,544,200],{"class":186},[176,546,203],{"class":190},[176,548,206],{"class":186},[176,550,209],{"class":190},[176,552,206],{"class":186},[176,554,214],{"class":190},[176,556,206],{"class":186},[176,558,366],{"class":190},[176,560,217],{"class":186},[176,562,563,565,567],{"class":178,"line":220},[176,564,223],{"class":182},[176,566,187],{"class":186},[176,568,569],{"class":190},"keep_attrs\n",[176,571,572,574],{"class":178,"line":231},[176,573,382],{"class":182},[176,575,385],{"class":186},[176,577,578,580],{"class":178,"line":242},[176,579,390],{"class":186},[176,581,393],{"class":190},[176,583,584,586],{"class":178,"line":315},[176,585,390],{"class":186},[176,587,400],{"class":190},[148,589,403],{},[166,591,593],{"className":168,"code":592,"language":170,"meta":171,"style":171},"name: Keep foo and bar\nscope: [spans, logs, events, datapoints]\ntype: keep_attrs\nregexp: ^(foo|bar)$\n",[173,594,595,603,625,633],{"__ignoreMap":171},[176,596,597,599,601],{"class":178,"line":179},[176,598,183],{"class":182},[176,600,187],{"class":186},[176,602,538],{"class":190},[176,604,605,607,609,611,613,615,617,619,621,623],{"class":178,"line":194},[176,606,197],{"class":182},[176,608,200],{"class":186},[176,610,203],{"class":190},[176,612,206],{"class":186},[176,614,209],{"class":190},[176,616,206],{"class":186},[176,618,214],{"class":190},[176,620,206],{"class":186},[176,622,366],{"class":190},[176,624,217],{"class":186},[176,626,627,629,631],{"class":178,"line":220},[176,628,223],{"class":182},[176,630,187],{"class":186},[176,632,569],{"class":190},[176,634,635,637,639],{"class":178,"line":231},[176,636,451],{"class":182},[176,638,187],{"class":186},[176,640,456],{"class":190},[161,642,644],{"id":643},"drop","Drop",[166,646,648],{"className":168,"code":647,"language":170,"meta":171,"style":171},"name: Drop hello logs\nscope: [logs]\ntype: drop\nif: attr(\"log_message\") contains \"hello\"\n",[173,649,650,659,669,678],{"__ignoreMap":171},[176,651,652,654,656],{"class":178,"line":179},[176,653,183],{"class":182},[176,655,187],{"class":186},[176,657,658],{"class":190},"Drop hello logs\n",[176,660,661,663,665,667],{"class":178,"line":194},[176,662,197],{"class":182},[176,664,200],{"class":186},[176,666,209],{"class":190},[176,668,217],{"class":186},[176,670,671,673,675],{"class":178,"line":220},[176,672,223],{"class":182},[176,674,187],{"class":186},[176,676,677],{"class":190},"drop\n",[176,679,680,682,684],{"class":178,"line":231},[176,681,515],{"class":182},[176,683,187],{"class":186},[176,685,686],{"class":190},"attr(\"log_message\") contains \"hello\"\n",[166,688,690],{"className":168,"code":689,"language":170,"meta":171,"style":171},"name: Drop Redis evalsha\nscope: [spans]\ntype: drop\nif: spanName() == \"evalsha\" && spanStatusCode() != \"error\"\n",[173,691,692,701,711,719],{"__ignoreMap":171},[176,693,694,696,698],{"class":178,"line":179},[176,695,183],{"class":182},[176,697,187],{"class":186},[176,699,700],{"class":190},"Drop Redis evalsha\n",[176,702,703,705,707,709],{"class":178,"line":194},[176,704,197],{"class":182},[176,706,200],{"class":186},[176,708,203],{"class":190},[176,710,217],{"class":186},[176,712,713,715,717],{"class":178,"line":220},[176,714,223],{"class":182},[176,716,187],{"class":186},[176,718,677],{"class":190},[176,720,721,723,725],{"class":178,"line":231},[176,722,515],{"class":182},[176,724,187],{"class":186},[176,726,727],{"class":190},"spanName() == \"evalsha\" && spanStatusCode() != \"error\"\n",[148,729,730,731,733,734,736],{},"The ",[173,732,515],{}," condition is required for ",[173,735,643],{},". Execution stops for the matching record — subsequent operations are skipped.",[161,738,740],{"id":739},"sample","Sample",[166,742,744],{"className":168,"code":743,"language":170,"meta":171,"style":171},"name: Sample 50% hello logs\nscope: [logs]\ntype: sample\nfraction: 0.5\nif: attr(\"log_message\") startsWith \"hello\"\n",[173,745,746,755,765,774,784],{"__ignoreMap":171},[176,747,748,750,752],{"class":178,"line":179},[176,749,183],{"class":182},[176,751,187],{"class":186},[176,753,754],{"class":190},"Sample 50% hello logs\n",[176,756,757,759,761,763],{"class":178,"line":194},[176,758,197],{"class":182},[176,760,200],{"class":186},[176,762,209],{"class":190},[176,764,217],{"class":186},[176,766,767,769,771],{"class":178,"line":220},[176,768,223],{"class":182},[176,770,187],{"class":186},[176,772,773],{"class":190},"sample\n",[176,775,776,779,781],{"class":178,"line":231},[176,777,778],{"class":182},"fraction",[176,780,187],{"class":186},[176,782,783],{"class":323},"0.5\n",[176,785,786,788,790],{"class":178,"line":242},[176,787,515],{"class":182},[176,789,187],{"class":186},[176,791,792],{"class":190},"attr(\"log_message\") startsWith \"hello\"\n",[148,794,795,797,798,800],{},[173,796,778],{}," must be between 0 and 1. For spans, sampling is trace-aware: all spans in a trace are kept or dropped together. The ",[173,799,515],{}," condition is optional — omitting it applies sampling to all records in scope.",[161,802,804],{"id":803},"change-attribute-type","Change attribute type",[166,806,808],{"className":168,"code":807,"language":170,"meta":171,"style":171},"name: Convert elapsed_ms to float\nscope: [spans]\ntype: change_attr_type\nkey: elapsed_ms\ntype: float\n",[173,809,810,819,829,838,848],{"__ignoreMap":171},[176,811,812,814,816],{"class":178,"line":179},[176,813,183],{"class":182},[176,815,187],{"class":186},[176,817,818],{"class":190},"Convert elapsed_ms to float\n",[176,820,821,823,825,827],{"class":178,"line":194},[176,822,197],{"class":182},[176,824,200],{"class":186},[176,826,203],{"class":190},[176,828,217],{"class":186},[176,830,831,833,835],{"class":178,"line":220},[176,832,223],{"class":182},[176,834,187],{"class":186},[176,836,837],{"class":190},"change_attr_type\n",[176,839,840,843,845],{"class":178,"line":231},[176,841,842],{"class":182},"key",[176,844,187],{"class":186},[176,846,847],{"class":190},"elapsed_ms\n",[176,849,850,852,854],{"class":178,"line":242},[176,851,223],{"class":182},[176,853,187],{"class":186},[176,855,856],{"class":190},"float\n",[148,858,859,860,206,863,206,866,206,869,872],{},"Supported types: ",[173,861,862],{},"string",[173,864,865],{},"int",[173,867,868],{},"float",[173,870,871],{},"bool",".",[874,875,876],"note",{},[148,877,878,881,882,885],{},[173,879,880],{},"change_attr_type"," is not supported for datapoints. Use the ",[173,883,884],{},"script"," operation with type parsing functions instead.",[161,887,889],{"id":888},"flatten-map","Flatten map",[148,891,892,893,896],{},"By default, Uptrace does not index attributes that contain nested maps. The ",[173,894,895],{},"flatten_map"," operation extracts dot-separated paths from a map attribute so they can be queried:",[166,898,900],{"className":168,"code":899,"language":170,"meta":171,"style":171},"name: Flatten the object attribute\nscope: [spans]\ntype: flatten_map\nmaps: ['object']\ninclude_paths: ['object.nested.foo']\ninclude_regexp: '^object.nested\\.'\nexclude_paths: ['object.nested.hello']\nexclude_regexp: 'secret'\n",[173,901,902,911,921,930,942,954,964,976],{"__ignoreMap":171},[176,903,904,906,908],{"class":178,"line":179},[176,905,183],{"class":182},[176,907,187],{"class":186},[176,909,910],{"class":190},"Flatten the object attribute\n",[176,912,913,915,917,919],{"class":178,"line":194},[176,914,197],{"class":182},[176,916,200],{"class":186},[176,918,203],{"class":190},[176,920,217],{"class":186},[176,922,923,925,927],{"class":178,"line":220},[176,924,223],{"class":182},[176,926,187],{"class":186},[176,928,929],{"class":190},"flatten_map\n",[176,931,932,935,937,940],{"class":178,"line":231},[176,933,934],{"class":182},"maps",[176,936,200],{"class":186},[176,938,939],{"class":190},"'object'",[176,941,217],{"class":186},[176,943,944,947,949,952],{"class":178,"line":242},[176,945,946],{"class":182},"include_paths",[176,948,200],{"class":186},[176,950,951],{"class":190},"'object.nested.foo'",[176,953,217],{"class":186},[176,955,956,959,961],{"class":178,"line":315},[176,957,958],{"class":182},"include_regexp",[176,960,187],{"class":186},[176,962,963],{"class":190},"'^object.nested\\.'\n",[176,965,966,969,971,974],{"class":178,"line":512},[176,967,968],{"class":182},"exclude_paths",[176,970,200],{"class":186},[176,972,973],{"class":190},"'object.nested.hello'",[176,975,217],{"class":186},[176,977,979,982,984],{"class":178,"line":978},8,[176,980,981],{"class":182},"exclude_regexp",[176,983,187],{"class":186},[176,985,986],{"class":190},"'secret'\n",[148,988,989,990,992,993,995],{},"Without ",[173,991,946],{}," or ",[173,994,958],{},", the entire map is indexed up to 32 paths.",[161,997,999],{"id":998},"ip-geo-attrs","IP geo attributes",[148,1001,1002,1003,206,1006,1009,1010,1013],{},"Enriches IP address attributes with GeoIP data. For each specified key, Uptrace adds ",[173,1004,1005],{},"{key}_country_code",[173,1007,1008],{},"{key}_country_name",", and ",[173,1011,1012],{},"{key}_city",":",[166,1015,1017],{"className":168,"code":1016,"language":170,"meta":171,"style":171},"name: Enrich custom IP with geo data\nscope: [spans, logs, events]\ntype: ip_geo_attrs\nkeys:\n  - custom_ip_address\n",[173,1018,1019,1028,1046,1055,1061],{"__ignoreMap":171},[176,1020,1021,1023,1025],{"class":178,"line":179},[176,1022,183],{"class":182},[176,1024,187],{"class":186},[176,1026,1027],{"class":190},"Enrich custom IP with geo data\n",[176,1029,1030,1032,1034,1036,1038,1040,1042,1044],{"class":178,"line":194},[176,1031,197],{"class":182},[176,1033,200],{"class":186},[176,1035,203],{"class":190},[176,1037,206],{"class":186},[176,1039,209],{"class":190},[176,1041,206],{"class":186},[176,1043,214],{"class":190},[176,1045,217],{"class":186},[176,1047,1048,1050,1052],{"class":178,"line":220},[176,1049,223],{"class":182},[176,1051,187],{"class":186},[176,1053,1054],{"class":190},"ip_geo_attrs\n",[176,1056,1057,1059],{"class":178,"line":231},[176,1058,382],{"class":182},[176,1060,385],{"class":186},[176,1062,1063,1065],{"class":178,"line":242},[176,1064,390],{"class":186},[176,1066,1067],{"class":190},"custom_ip_address\n",[874,1069,1070],{},[148,1071,1072,1075,1076,1079],{},[173,1073,1074],{},"client_address"," and ",[173,1077,1078],{},"client_socket_address"," are automatically processed by Uptrace and should not be added manually.",[874,1081,1082],{},[148,1083,1084,1087],{},[173,1085,1086],{},"ip_geo_attrs"," is not supported for datapoints.",[161,1089,1091],{"id":1090},"text-index","Text index",[148,1093,1094,1095,1098,1099,1013],{},"Builds a full-text index column from selected attribute values, enabling ",[173,1096,1097],{},"*:value"," ",[152,1100,1102],{"href":1101},"\u002Ffeatures\u002Fsearching#searching-indexed-content","search syntax",[166,1104,1106],{"className":168,"code":1105,"language":170,"meta":171,"style":171},"name: Index request attributes\nscope: [spans, logs, events]\ntype: text_index\ninclude:\n  - log_message\n  - exception_message\n  - http.request.**\nexclude:\n  - http.request.headers.**\n",[173,1107,1108,1117,1135,1144,1151,1158,1165,1172,1179],{"__ignoreMap":171},[176,1109,1110,1112,1114],{"class":178,"line":179},[176,1111,183],{"class":182},[176,1113,187],{"class":186},[176,1115,1116],{"class":190},"Index request attributes\n",[176,1118,1119,1121,1123,1125,1127,1129,1131,1133],{"class":178,"line":194},[176,1120,197],{"class":182},[176,1122,200],{"class":186},[176,1124,203],{"class":190},[176,1126,206],{"class":186},[176,1128,209],{"class":190},[176,1130,206],{"class":186},[176,1132,214],{"class":190},[176,1134,217],{"class":186},[176,1136,1137,1139,1141],{"class":178,"line":220},[176,1138,223],{"class":182},[176,1140,187],{"class":186},[176,1142,1143],{"class":190},"text_index\n",[176,1145,1146,1149],{"class":178,"line":231},[176,1147,1148],{"class":182},"include",[176,1150,385],{"class":186},[176,1152,1153,1155],{"class":178,"line":242},[176,1154,390],{"class":186},[176,1156,1157],{"class":190},"log_message\n",[176,1159,1160,1162],{"class":178,"line":315},[176,1161,390],{"class":186},[176,1163,1164],{"class":190},"exception_message\n",[176,1166,1167,1169],{"class":178,"line":512},[176,1168,390],{"class":186},[176,1170,1171],{"class":190},"http.request.**\n",[176,1173,1174,1177],{"class":178,"line":978},[176,1175,1176],{"class":182},"exclude",[176,1178,385],{"class":186},[176,1180,1182,1184],{"class":178,"line":1181},9,[176,1183,390],{"class":186},[176,1185,1186],{"class":190},"http.request.headers.**\n",[148,1188,730,1189,1191],{},[173,1190,1148],{}," field accepts glob patterns:",[1193,1194,1195,1208],"table",{},[1196,1197,1198],"thead",{},[1199,1200,1201,1205],"tr",{},[1202,1203,1204],"th",{},"Pattern",[1202,1206,1207],{},"Description",[1209,1210,1211,1225,1238,1248],"tbody",{},[1199,1212,1213,1219],{},[1214,1215,1216],"td",{},[173,1217,1218],{},"foo",[1214,1220,1221,1222,1224],{},"Indexes the ",[173,1223,1218],{}," attribute directly",[1199,1226,1227,1232],{},[1214,1228,1229],{},[173,1230,1231],{},"foo.**",[1214,1233,1234,1235,1237],{},"Indexes all nested keys in the ",[173,1236,1218],{}," map",[1199,1239,1240,1245],{},[1214,1241,1242],{},[173,1243,1244],{},"foo.*",[1214,1246,1247],{},"Indexes one level of nested keys",[1199,1249,1250,1255],{},[1214,1251,1252],{},[173,1253,1254],{},"foo?.bar",[1214,1256,1257,1258,206,1261,1264],{},"Matches ",[173,1259,1260],{},"foo1",[173,1262,1263],{},"foo2",", etc.",[148,1266,1267],{},"Search is case-insensitive and token-based (no substring matching). Maximum indexed text per record: 4096 bytes.",[874,1269,1270],{},[148,1271,1272],{},"Text Index is billed separately based on indexed bytes. See the pricing page for details.",[161,1274,1275],{"id":884},"Script",[148,1277,1278,1279,1281],{},"Write arbitrary expressions to modify telemetry. The ",[173,1280,515],{}," condition is required.",[148,1283,1284],{},"Set error status when exception attributes are present:",[166,1286,1288],{"className":168,"code":1287,"language":170,"meta":171,"style":171},"name: Set error status when exception attributes are present\nscope: [spans]\ntype: script\nif: hasAttr(\"exception_type\") && hasAttr(\"exception_message\")\nthen:\n  - setSpanStatusCode(\"error\")\n  - setSpanStatusMessage(attr(\"exception_message\"))\nelse:\n  - setSpanStatusCode(\"ok\")\n",[173,1289,1290,1299,1309,1318,1327,1334,1341,1348,1355],{"__ignoreMap":171},[176,1291,1292,1294,1296],{"class":178,"line":179},[176,1293,183],{"class":182},[176,1295,187],{"class":186},[176,1297,1298],{"class":190},"Set error status when exception attributes are present\n",[176,1300,1301,1303,1305,1307],{"class":178,"line":194},[176,1302,197],{"class":182},[176,1304,200],{"class":186},[176,1306,203],{"class":190},[176,1308,217],{"class":186},[176,1310,1311,1313,1315],{"class":178,"line":220},[176,1312,223],{"class":182},[176,1314,187],{"class":186},[176,1316,1317],{"class":190},"script\n",[176,1319,1320,1322,1324],{"class":178,"line":231},[176,1321,515],{"class":182},[176,1323,187],{"class":186},[176,1325,1326],{"class":190},"hasAttr(\"exception_type\") && hasAttr(\"exception_message\")\n",[176,1328,1329,1332],{"class":178,"line":242},[176,1330,1331],{"class":182},"then",[176,1333,385],{"class":186},[176,1335,1336,1338],{"class":178,"line":315},[176,1337,390],{"class":186},[176,1339,1340],{"class":190},"setSpanStatusCode(\"error\")\n",[176,1342,1343,1345],{"class":178,"line":512},[176,1344,390],{"class":186},[176,1346,1347],{"class":190},"setSpanStatusMessage(attr(\"exception_message\"))\n",[176,1349,1350,1353],{"class":178,"line":978},[176,1351,1352],{"class":182},"else",[176,1354,385],{"class":186},[176,1356,1357,1359],{"class":178,"line":1181},[176,1358,390],{"class":186},[176,1360,1361],{"class":190},"setSpanStatusCode(\"ok\")\n",[148,1363,1364],{},"Parse a string attribute as float:",[166,1366,1368],{"className":168,"code":1367,"language":170,"meta":171,"style":171},"name: Parse elapsed_ms\nscope: [spans]\ntype: script\nif: hasAttr(\"elapsed_ms\")\nthen:\n  - setAttr(\"elapsed_ms\", parseFloat(attr(\"elapsed_ms\")))\n",[173,1369,1370,1379,1389,1397,1406,1412],{"__ignoreMap":171},[176,1371,1372,1374,1376],{"class":178,"line":179},[176,1373,183],{"class":182},[176,1375,187],{"class":186},[176,1377,1378],{"class":190},"Parse elapsed_ms\n",[176,1380,1381,1383,1385,1387],{"class":178,"line":194},[176,1382,197],{"class":182},[176,1384,200],{"class":186},[176,1386,203],{"class":190},[176,1388,217],{"class":186},[176,1390,1391,1393,1395],{"class":178,"line":220},[176,1392,223],{"class":182},[176,1394,187],{"class":186},[176,1396,1317],{"class":190},[176,1398,1399,1401,1403],{"class":178,"line":231},[176,1400,515],{"class":182},[176,1402,187],{"class":186},[176,1404,1405],{"class":190},"hasAttr(\"elapsed_ms\")\n",[176,1407,1408,1410],{"class":178,"line":242},[176,1409,1331],{"class":182},[176,1411,385],{"class":186},[176,1413,1414,1416],{"class":178,"line":315},[176,1415,390],{"class":186},[176,1417,1418],{"class":190},"setAttr(\"elapsed_ms\", parseFloat(attr(\"elapsed_ms\")))\n",[148,1420,1421],{},"Reduce attribute cardinality:",[166,1423,1425],{"className":168,"code":1424,"language":170,"meta":171,"style":171},"name: Normalize http_target\nscope: [spans]\ntype: script\nif: metricName() startsWith \"http_server_\" && hasAttr(\"http_target\")\nthen:\n  - setAttr(\"http_target\", replaceGlob(attr(\"http_target\"), \"\u002Fuser\u002F*\u002Flist\u002F*\", \"\u002Fuser\u002F{userId}\u002Flist\u002F{listId}\"))\n",[173,1426,1427,1436,1446,1454,1463,1469],{"__ignoreMap":171},[176,1428,1429,1431,1433],{"class":178,"line":179},[176,1430,183],{"class":182},[176,1432,187],{"class":186},[176,1434,1435],{"class":190},"Normalize http_target\n",[176,1437,1438,1440,1442,1444],{"class":178,"line":194},[176,1439,197],{"class":182},[176,1441,200],{"class":186},[176,1443,203],{"class":190},[176,1445,217],{"class":186},[176,1447,1448,1450,1452],{"class":178,"line":220},[176,1449,223],{"class":182},[176,1451,187],{"class":186},[176,1453,1317],{"class":190},[176,1455,1456,1458,1460],{"class":178,"line":231},[176,1457,515],{"class":182},[176,1459,187],{"class":186},[176,1461,1462],{"class":190},"metricName() startsWith \"http_server_\" && hasAttr(\"http_target\")\n",[176,1464,1465,1467],{"class":178,"line":242},[176,1466,1331],{"class":182},[176,1468,385],{"class":186},[176,1470,1471,1473],{"class":178,"line":315},[176,1472,390],{"class":186},[176,1474,1475],{"class":190},"setAttr(\"http_target\", replaceGlob(attr(\"http_target\"), \"\u002Fuser\u002F*\u002Flist\u002F*\", \"\u002Fuser\u002F{userId}\u002Flist\u002F{listId}\"))\n",[148,1477,1478],{},"Replace all numbers using a regular expression:",[166,1480,1482],{"className":168,"code":1481,"language":170,"meta":171,"style":171},"name: Replace numbers in foo\nscope: [spans]\ntype: script\nif: hasAttr(\"foo\")\nthen:\n  - setAttr(\"foo\", replaceAllRegexp(attr(\"foo\"), \"(\\\\d+)\", \"\u003Cnumber>\"))\n",[173,1483,1484,1493,1503,1511,1520,1526],{"__ignoreMap":171},[176,1485,1486,1488,1490],{"class":178,"line":179},[176,1487,183],{"class":182},[176,1489,187],{"class":186},[176,1491,1492],{"class":190},"Replace numbers in foo\n",[176,1494,1495,1497,1499,1501],{"class":178,"line":194},[176,1496,197],{"class":182},[176,1498,200],{"class":186},[176,1500,203],{"class":190},[176,1502,217],{"class":186},[176,1504,1505,1507,1509],{"class":178,"line":220},[176,1506,223],{"class":182},[176,1508,187],{"class":186},[176,1510,1317],{"class":190},[176,1512,1513,1515,1517],{"class":178,"line":231},[176,1514,515],{"class":182},[176,1516,187],{"class":186},[176,1518,1519],{"class":190},"hasAttr(\"foo\")\n",[176,1521,1522,1524],{"class":178,"line":242},[176,1523,1331],{"class":182},[176,1525,385],{"class":186},[176,1527,1528,1530],{"class":178,"line":315},[176,1529,390],{"class":186},[176,1531,1532],{"class":190},"setAttr(\"foo\", replaceAllRegexp(attr(\"foo\"), \"(\\\\d+)\", \"\u003Cnumber>\"))\n",[148,1534,1535],{},"Convert a log into a span:",[166,1537,1539],{"className":168,"code":1538,"language":170,"meta":171,"style":171},"name: Convert logs with elapsed_ms to spans\nscope: [logs]\ntype: script\nif: hasAttr(\"elapsed_ms\")\nthen:\n  - setSpanName(\"operation-name\")\n  - setLogName(\"\")\n  - setSpanDuration(parseFloat(attr(\"elapsed_ms\")) * 1e6)\n  - setSpanStatusCode(\"ok\")\n",[173,1540,1541,1550,1560,1568,1576,1582,1589,1596,1603],{"__ignoreMap":171},[176,1542,1543,1545,1547],{"class":178,"line":179},[176,1544,183],{"class":182},[176,1546,187],{"class":186},[176,1548,1549],{"class":190},"Convert logs with elapsed_ms to spans\n",[176,1551,1552,1554,1556,1558],{"class":178,"line":194},[176,1553,197],{"class":182},[176,1555,200],{"class":186},[176,1557,209],{"class":190},[176,1559,217],{"class":186},[176,1561,1562,1564,1566],{"class":178,"line":220},[176,1563,223],{"class":182},[176,1565,187],{"class":186},[176,1567,1317],{"class":190},[176,1569,1570,1572,1574],{"class":178,"line":231},[176,1571,515],{"class":182},[176,1573,187],{"class":186},[176,1575,1405],{"class":190},[176,1577,1578,1580],{"class":178,"line":242},[176,1579,1331],{"class":182},[176,1581,385],{"class":186},[176,1583,1584,1586],{"class":178,"line":315},[176,1585,390],{"class":186},[176,1587,1588],{"class":190},"setSpanName(\"operation-name\")\n",[176,1590,1591,1593],{"class":178,"line":512},[176,1592,390],{"class":186},[176,1594,1595],{"class":190},"setLogName(\"\")\n",[176,1597,1598,1600],{"class":178,"line":978},[176,1599,390],{"class":186},[176,1601,1602],{"class":190},"setSpanDuration(parseFloat(attr(\"elapsed_ms\")) * 1e6)\n",[176,1604,1605,1607],{"class":178,"line":1181},[176,1606,390],{"class":186},[176,1608,1361],{"class":190},[1610,1611],"hr",{},[156,1613,1615],{"id":1614},"functions-reference","Functions reference",[148,1617,1618,1619,1625,1626,1628,1629,1631],{},"In addition to built-in ",[152,1620,1624],{"href":1621,"rel":1622},"https:\u002F\u002Fexpr-lang.org\u002Fdocs\u002Flanguage-definition",[1623],"nofollow","Expr"," functions, Uptrace provides the following. All functions work in both ",[173,1627,515],{}," conditions and ",[173,1630,884],{}," expressions.",[161,1633,1635],{"id":1634},"span-log-and-event-functions","Span, log, and event functions",[1637,1638,1640],"h4",{"id":1639},"getters","Getters",[1193,1642,1643,1655],{},[1196,1644,1645],{},[1199,1646,1647,1650,1653],{},[1202,1648,1649],{},"Function",[1202,1651,1652],{},"Scope",[1202,1654,1207],{},[1209,1656,1657,1670,1682,1698,1725,1741,1762],{},[1199,1658,1659,1664,1667],{},[1214,1660,1661],{},[173,1662,1663],{},"spanName()",[1214,1665,1666],{},"spans, logs, events",[1214,1668,1669],{},"Returns the span name or an empty string.",[1199,1671,1672,1677,1679],{},[1214,1673,1674],{},[173,1675,1676],{},"eventName()",[1214,1678,214],{},[1214,1680,1681],{},"Returns the event name or an empty string.",[1199,1683,1684,1689,1691],{},[1214,1685,1686],{},[173,1687,1688],{},"logName()",[1214,1690,209],{},[1214,1692,1693,1694,1697],{},"Returns the log name (alias for ",[173,1695,1696],{},"eventName",").",[1199,1699,1700,1705,1707],{},[1214,1701,1702],{},[173,1703,1704],{},"spanKind()",[1214,1706,203],{},[1214,1708,1709,1710,206,1713,206,1716,206,1719,206,1722,1697],{},"Returns the span kind (",[173,1711,1712],{},"internal",[173,1714,1715],{},"server",[173,1717,1718],{},"client",[173,1720,1721],{},"producer",[173,1723,1724],{},"consumer",[1199,1726,1727,1732,1734],{},[1214,1728,1729],{},[173,1730,1731],{},"spanDuration()",[1214,1733,203],{},[1214,1735,1736,1737,1740],{},"Returns the span duration as a ",[173,1738,1739],{},"time.Duration"," (nanosecond precision).",[1199,1742,1743,1748,1750],{},[1214,1744,1745],{},[173,1746,1747],{},"spanStatusCode()",[1214,1749,1666],{},[1214,1751,1752,1753,206,1756,206,1759,1697],{},"Returns the span status code (",[173,1754,1755],{},"unset",[173,1757,1758],{},"ok",[173,1760,1761],{},"error",[1199,1763,1764,1769,1771],{},[1214,1765,1766],{},[173,1767,1768],{},"spanStatusMessage()",[1214,1770,1666],{},[1214,1772,1773],{},"Returns the span status message.",[1637,1775,1777],{"id":1776},"setters","Setters",[1193,1779,1780,1790],{},[1196,1781,1782],{},[1199,1783,1784,1786,1788],{},[1202,1785,1649],{},[1202,1787,1652],{},[1202,1789,1207],{},[1209,1791,1792,1804,1816,1828,1850,1870,1888],{},[1199,1793,1794,1799,1801],{},[1214,1795,1796],{},[173,1797,1798],{},"setSpanName(string)",[1214,1800,203],{},[1214,1802,1803],{},"Sets the span name.",[1199,1805,1806,1811,1813],{},[1214,1807,1808],{},[173,1809,1810],{},"setEventName(string)",[1214,1812,214],{},[1214,1814,1815],{},"Sets the event name.",[1199,1817,1818,1823,1825],{},[1214,1819,1820],{},[173,1821,1822],{},"setLogName(string)",[1214,1824,209],{},[1214,1826,1827],{},"Sets the log name.",[1199,1829,1830,1835,1837],{},[1214,1831,1832],{},[173,1833,1834],{},"setSpanKind(string)",[1214,1836,203],{},[1214,1838,1839,1840,206,1842,206,1844,206,1846,206,1848,872],{},"Sets the span kind. Must be one of: ",[173,1841,1712],{},[173,1843,1715],{},[173,1845,1718],{},[173,1847,1721],{},[173,1849,1724],{},[1199,1851,1852,1857,1859],{},[1214,1853,1854],{},[173,1855,1856],{},"setSpanDuration(nanoseconds)",[1214,1858,203],{},[1214,1860,1861,1862,206,1864,1867,1868,872],{},"Sets the span duration in nanoseconds. Accepts ",[173,1863,865],{},[173,1865,1866],{},"int64",", or ",[173,1869,1739],{},[1199,1871,1872,1877,1879],{},[1214,1873,1874],{},[173,1875,1876],{},"setSpanStatusCode(string)",[1214,1878,203],{},[1214,1880,1881,1882,206,1884,206,1886,1697],{},"Sets the span status code (",[173,1883,1755],{},[173,1885,1758],{},[173,1887,1761],{},[1199,1889,1890,1895,1897],{},[1214,1891,1892],{},[173,1893,1894],{},"setSpanStatusMessage(string)",[1214,1896,203],{},[1214,1898,1899],{},"Sets the span status message.",[1637,1901,1903],{"id":1902},"attribute-functions","Attribute functions",[1193,1905,1906,1916],{},[1196,1907,1908],{},[1199,1909,1910,1912,1914],{},[1202,1911,1649],{},[1202,1913,1652],{},[1202,1915,1207],{},[1209,1917,1918,1930,1959,1975,1987,1999,2011],{},[1199,1919,1920,1925,1927],{},[1214,1921,1922],{},[173,1923,1924],{},"attr(key)",[1214,1926,1666],{},[1214,1928,1929],{},"Returns the attribute value by key.",[1199,1931,1932,1937,1939],{},[1214,1933,1934],{},[173,1935,1936],{},"attrType(key)",[1214,1938,1666],{},[1214,1940,1941,1942,206,1945,206,1947,206,1949,206,1951,206,1953,1867,1956,872],{},"Returns the type: ",[173,1943,1944],{},"nil",[173,1946,862],{},[173,1948,865],{},[173,1950,868],{},[173,1952,871],{},[173,1954,1955],{},"array",[173,1957,1958],{},"map",[1199,1960,1961,1966,1968],{},[1214,1962,1963],{},[173,1964,1965],{},"hasAttr(key)",[1214,1967,1666],{},[1214,1969,1970,1971,1974],{},"Returns ",[173,1972,1973],{},"true"," if the attribute exists.",[1199,1976,1977,1982,1984],{},[1214,1978,1979],{},[173,1980,1981],{},"setAttr(key, value)",[1214,1983,1666],{},[1214,1985,1986],{},"Sets the attribute value.",[1199,1988,1989,1994,1996],{},[1214,1990,1991],{},[173,1992,1993],{},"deleteAttr(key)",[1214,1995,1666],{},[1214,1997,1998],{},"Deletes the attribute.",[1199,2000,2001,2006,2008],{},[1214,2002,2003],{},[173,2004,2005],{},"renameAttr(oldKey, newKey)",[1214,2007,1666],{},[1214,2009,2010],{},"Renames the attribute.",[1199,2012,2013,2018,2020],{},[1214,2014,2015],{},[173,2016,2017],{},"renameAttr(oldKey, newKey, overwrite)",[1214,2019,1666],{},[1214,2021,2022],{},"Renames the attribute, optionally overwriting if the target exists.",[1637,2024,2026],{"id":2025},"type-parsing-functions","Type parsing functions",[1193,2028,2029,2039],{},[1196,2030,2031],{},[1199,2032,2033,2035,2037],{},[1202,2034,1649],{},[1202,2036,1652],{},[1202,2038,1207],{},[1209,2040,2041,2055,2069,2083],{},[1199,2042,2043,2048,2050],{},[1214,2044,2045],{},[173,2046,2047],{},"parseInt(value)",[1214,2049,1666],{},[1214,2051,2052,2053,872],{},"Parses the value as ",[173,2054,1866],{},[1199,2056,2057,2062,2064],{},[1214,2058,2059],{},[173,2060,2061],{},"parseUint(value)",[1214,2063,1666],{},[1214,2065,2052,2066,872],{},[173,2067,2068],{},"uint64",[1199,2070,2071,2076,2078],{},[1214,2072,2073],{},[173,2074,2075],{},"parseFloat(value)",[1214,2077,1666],{},[1214,2079,2052,2080,872],{},[173,2081,2082],{},"float64",[1199,2084,2085,2090,2092],{},[1214,2086,2087],{},[173,2088,2089],{},"parseBool(value)",[1214,2091,1666],{},[1214,2093,2094,2095,2097,2098,206,2101,206,2104,206,2107,872],{},"Parses as ",[173,2096,871],{},". Accepts ",[173,2099,2100],{},"\"true\"",[173,2102,2103],{},"\"false\"",[173,2105,2106],{},"\"1\"",[173,2108,2109],{},"\"0\"",[161,2111,2113],{"id":2112},"datapoint-functions","Datapoint functions",[1637,2115,1640],{"id":2116},"getters-1",[1193,2118,2119,2127],{},[1196,2120,2121],{},[1199,2122,2123,2125],{},[1202,2124,1649],{},[1202,2126,1207],{},[1209,2128,2129,2139,2149,2159,2169],{},[1199,2130,2131,2136],{},[1214,2132,2133],{},[173,2134,2135],{},"metricName()",[1214,2137,2138],{},"Returns the metric name.",[1199,2140,2141,2146],{},[1214,2142,2143],{},[173,2144,2145],{},"metricUnit()",[1214,2147,2148],{},"Returns the metric unit.",[1199,2150,2151,2156],{},[1214,2152,2153],{},[173,2154,2155],{},"metricInstrument()",[1214,2157,2158],{},"Returns the metric instrument type.",[1199,2160,2161,2166],{},[1214,2162,2163],{},[173,2164,2165],{},"libraryName()",[1214,2167,2168],{},"Returns the instrumentation library name.",[1199,2170,2171,2176],{},[1214,2172,2173],{},[173,2174,2175],{},"libraryVersion()",[1214,2177,2178],{},"Returns the instrumentation library version.",[1637,2180,1777],{"id":2181},"setters-1",[1193,2183,2184,2192],{},[1196,2185,2186],{},[1199,2187,2188,2190],{},[1202,2189,1649],{},[1202,2191,1207],{},[1209,2193,2194,2204,2214],{},[1199,2195,2196,2201],{},[1214,2197,2198],{},[173,2199,2200],{},"setMetricName(string)",[1214,2202,2203],{},"Sets the metric name.",[1199,2205,2206,2211],{},[1214,2207,2208],{},[173,2209,2210],{},"setMetricUnit(string)",[1214,2212,2213],{},"Sets the metric unit.",[1199,2215,2216,2221],{},[1214,2217,2218],{},[173,2219,2220],{},"setMetricInstrument(string)",[1214,2222,2223],{},"Sets the metric instrument type.",[1637,2225,1903],{"id":2226},"attribute-functions-1",[1193,2228,2229,2237],{},[1196,2230,2231],{},[1199,2232,2233,2235],{},[1202,2234,1649],{},[1202,2236,1207],{},[1209,2238,2239,2248,2258,2266,2274,2282],{},[1199,2240,2241,2245],{},[1214,2242,2243],{},[173,2244,1924],{},[1214,2246,2247],{},"Returns the attribute value as a string.",[1199,2249,2250,2254],{},[1214,2251,2252],{},[173,2253,1965],{},[1214,2255,1970,2256,1974],{},[173,2257,1973],{},[1199,2259,2260,2264],{},[1214,2261,2262],{},[173,2263,1981],{},[1214,2265,1986],{},[1199,2267,2268,2272],{},[1214,2269,2270],{},[173,2271,1993],{},[1214,2273,1998],{},[1199,2275,2276,2280],{},[1214,2277,2278],{},[173,2279,2005],{},[1214,2281,2010],{},[1199,2283,2284,2288],{},[1214,2285,2286],{},[173,2287,2017],{},[1214,2289,2290],{},"Renames the attribute, optionally overwriting.",[161,2292,2294],{"id":2293},"common-functions","Common functions",[1193,2296,2297,2305],{},[1196,2298,2299],{},[1199,2300,2301,2303],{},[1202,2302,1649],{},[1202,2304,1207],{},[1209,2306,2307,2330,2345,2361,2380],{},[1199,2308,2309,2314],{},[1214,2310,2311],{},[173,2312,2313],{},"replaceGlob(src, pattern, repl)",[1214,2315,1970,2316,2319,2320,2323,2324,2327,2328,872],{},[173,2317,2318],{},"repl"," if ",[173,2321,2322],{},"src"," matches glob ",[173,2325,2326],{},"pattern",", otherwise returns ",[173,2329,2322],{},[1199,2331,2332,2337],{},[1214,2333,2334],{},[173,2335,2336],{},"replaceAllRegexp(src, pattern, repl)",[1214,2338,2339,2340,2342,2343,872],{},"Replaces all regexp matches in ",[173,2341,2322],{}," with ",[173,2344,2318],{},[1199,2346,2347,2352],{},[1214,2348,2349],{},[173,2350,2351],{},"extractAllRegexp(src, pattern, repl)",[1214,2353,2354,2355,2357,2358,2360],{},"Extracts and transforms all regexp matches from ",[173,2356,2322],{}," using ",[173,2359,2318],{}," template.",[1199,2362,2363,2368],{},[1214,2364,2365],{},[173,2366,2367],{},"parseDuration(string)",[1214,2369,2370,2371,206,2374,2377,2378,872],{},"Parses a duration string (e.g. ",[173,2372,2373],{},"\"1h30m\"",[173,2375,2376],{},"\"500ms\"",") as ",[173,2379,1739],{},[1199,2381,2382,2387],{},[1214,2383,2384],{},[173,2385,2386],{},"parseByteSize(string)",[1214,2388,2389,2390,206,2393,2377,2396,2398],{},"Parses a byte size string (e.g. ",[173,2391,2392],{},"\"1GB\"",[173,2394,2395],{},"\"512MB\"",[173,2397,1866],{}," bytes.",[156,2400,2402],{"id":2401},"related","Related",[2404,2405,2406,2413],"ul",{},[2407,2408,2409],"li",{},[152,2410,2412],{"href":1621,"rel":2411},[1623],"Expr language definition",[2407,2414,2415,2417],{},[152,2416,15],{"href":90}," — overview, scope rules, and common recipes",[2419,2420,2421],"style",{},"html pre.shiki code .shJU0, html code.shiki .shJU0{--shiki-default:#22863A}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}",{"title":171,"searchDepth":231,"depth":194,"links":2423},[2424,2436,2441],{"id":158,"depth":194,"text":159,"children":2425},[2426,2427,2428,2429,2430,2431,2432,2433,2434,2435],{"id":163,"depth":220,"text":164},{"id":327,"depth":220,"text":328},{"id":523,"depth":220,"text":524},{"id":643,"depth":220,"text":644},{"id":739,"depth":220,"text":740},{"id":803,"depth":220,"text":804},{"id":888,"depth":220,"text":889},{"id":998,"depth":220,"text":999},{"id":1090,"depth":220,"text":1091},{"id":884,"depth":220,"text":1275},{"id":1614,"depth":194,"text":1615,"children":2437},[2438,2439,2440],{"id":1634,"depth":220,"text":1635},{"id":2112,"depth":220,"text":2113},{"id":2293,"depth":220,"text":2294},{"id":2401,"depth":194,"text":2402},"Complete reference for all Uptrace transformation operation types and built-in Expr functions for spans, logs, events, and metric datapoints.","md",null,{"readingTime":2446},{"text":2447,"minutes":2448,"time":2449,"words":2450},"5 min read",4.395,263700,879,{"title":95},{"title":143,"description":2442},"wGF3yXojgBgEsro28hk-WVaeeVkbVdUjQ4xnVvwCAh0",[2455,2457],{"title":15,"path":90,"stem":91,"description":2456,"children":-1},"Use YAML-based transformations and Expr filters to rename attributes, parse payloads, sample or drop telemetry, and build full-text indexes before data reaches Uptrace.",{"title":99,"path":100,"stem":101,"description":2458,"children":-1},"Visualize service dependencies, request flows, error rates, and latency across your infrastructure with Uptrace service graphs built from OpenTelemetry span relationships.",1782042561401]