id stringlengths 36 36 | document stringlengths 3 3k | metadata stringlengths 23 69 | embeddings listlengths 384 384 |
|---|---|---|---|
6a31e976-156f-408f-85d1-a03d85747a65 | Using the bot {#using-the-bot}
Start the bot:
sh
uv run main.py
2.
In Slack:
- Mention the bot in a channel:
@yourbot Who are the top contributors to the ClickHouse git repo?
- Reply to the thread with a mention:
@yourbot how many contributions did these users make last week?
- DM the bot:... | {"source_file": "slackbot.md"} | [
-0.0331927090883255,
-0.07737210392951965,
-0.028314251452684402,
0.05614766851067543,
0.03777359426021576,
-0.06059178709983826,
0.03571346402168274,
0.0638701319694519,
-0.021703103557229042,
0.06818826496601105,
0.005063166841864586,
-0.0656546801328659,
0.0486871637403965,
-0.017435615... |
adc56de0-e218-4984-9941-94b2f6047e66 | slug: /use-cases/AI/MCP/ai-agent-libraries/copilotkit
sidebar_label: 'Integrate CopilotKit'
title: 'How to build an AI Agent with CopilotKit and the ClickHouse MCP Server'
pagination_prev: null
pagination_next: null
description: 'Learn how to build an agentic application using data stored in ClickHouse with ClickHouse ... | {"source_file": "copilotkit.md"} | [
-0.06161735951900482,
-0.04125136882066727,
-0.034090641885995865,
-0.004801311995834112,
-0.03898213431239128,
-0.017262626439332962,
0.0233177337795496,
0.0361323282122612,
-0.0543876476585865,
-0.023154977709054947,
0.05016842111945152,
-0.025262873619794846,
0.04023706167936325,
0.0015... |
517218f5-b560-4d47-9ff1-34b3bfae281e | slug: /use-cases/AI/MCP/ai-agent-libraries/langchain
sidebar_label: 'Integrate Langchain'
title: 'How to build a LangChain/LangGraph AI agent using ClickHouse MCP Server.'
pagination_prev: null
pagination_next: null
description: 'Learn how to build a LangChain/LangGraph AI agent that can interact with ClickHouse''s SQL... | {"source_file": "langchain.md"} | [
-0.016389956697821617,
-0.08493088185787201,
0.005239808466285467,
-0.028796948492527008,
-0.062152788043022156,
0.03349292650818825,
0.018386313691735268,
0.0009910828666761518,
-0.06727943569421768,
-0.012710656970739365,
0.052043281495571136,
-0.045395322144031525,
0.06892136484384537,
... |
5315bdff-6d8c-44c2-ac95-81af75e4b71c | Configure the handler for the streamed output so that it's easier to consume:
```python
class UltraCleanStreamHandler:
def
init
(self):
self.buffer = ""
self.in_text_generation = False
self.last_was_tool = False
def handle_chunk(self, chunk):
event = chunk.get("event", "")
if e... | {"source_file": "langchain.md"} | [
-0.03242234140634537,
-0.02162969671189785,
-0.01088707521557808,
0.0475614108145237,
0.02035900019109249,
-0.07425674051046371,
0.035939283668994904,
-0.021721545606851578,
0.017171483486890793,
-0.05289817228913307,
0.004897146951407194,
-0.03318273648619652,
-0.05296401306986809,
0.0117... |
7084d28b-99f8-4f3b-931e-723aa91987db | print("\n")
```
You should see a similar response as below:
``response title="Response"
I'll help you find who has committed the most code to ClickHouse by exploring the available databases and tables to locate git commit data.
🔧 list_databases ✅ I can see there's a
git
database which likely contains git commit... | {"source_file": "langchain.md"} | [
-0.010642974637448788,
-0.040368348360061646,
-0.0751042440533638,
0.03274662047624588,
-0.026493100449442863,
-0.04363572224974632,
0.06397727131843567,
0.005414256360381842,
0.019002018496394157,
0.06310027092695236,
0.022844387218356133,
-0.01316668838262558,
0.03223629295825958,
-0.110... |
66b868db-f392-4033-9986-0fae76349879 | slug: /use-cases/AI/MCP/ai-agent-libraries/microsoft-agent-framework
sidebar_label: 'Integrate Microsoft Agent Framework'
title: 'How to build an AI Agent with Microsoft Agent Framework and the ClickHouse MCP Server'
pagination_prev: null
pagination_next: null
description: 'Learn how build an AI Agent with Microsoft Ag... | {"source_file": "microsoft-agent-framework.md"} | [
-0.010116920806467533,
-0.09826497733592987,
-0.07077761739492416,
-0.0038157012313604355,
-0.008028114214539528,
0.010800037533044815,
0.0248581450432539,
-0.004328981041908264,
-0.08435533195734024,
0.01963423751294613,
0.021654043346643448,
-0.027430756017565727,
0.09163811057806015,
0.... |
30e24286-37d8-49cf-8f40-5d6fb5b7e361 | The output of running this script is shown below:
```response title="Response"
User: Tell me about UK property prices over the last five years
I looked at monthly UK sold-price records in the uk.uk_price_paid_simple_partitioned table for the last five years (toStartOfMonth(date), from Oct 2020 → Aug 2025). Summary an... | {"source_file": "microsoft-agent-framework.md"} | [
-0.025380799546837807,
-0.01944240927696228,
0.046473145484924316,
0.053078215569257736,
0.0024864887818694115,
-0.031863775104284286,
-0.06372497975826263,
0.08661692589521408,
0.02851446159183979,
0.0573936328291893,
0.003305775113403797,
-0.04484526440501213,
0.01150599867105484,
-0.028... |
b33039e3-5796-4d21-8f74-3eb21dd57220 | Which follow-up would you like?
``` | {"source_file": "microsoft-agent-framework.md"} | [
-0.1630401909351349,
-0.009210189804434776,
0.03191966935992241,
-0.032029956579208374,
0.00370764615945518,
0.007762333378195763,
-0.02828919142484665,
0.0022837535943835974,
0.027009280398488045,
0.053770896047353745,
0.05289345234632492,
0.06121724471449852,
-0.0328657366335392,
-0.0100... |
86232aba-b640-476e-99e0-cabf345223fa | slug: /use-cases/AI/MCP/ai-agent-libraries/openai-agents
sidebar_label: 'Integrate OpenAI'
title: 'How to build an OpenAI agent using ClickHouse MCP Server.'
pagination_prev: null
pagination_next: null
description: 'Learn how to build an OpenAI agent that can interact with ClickHouse MCP Server.'
keywords: ['ClickHouse... | {"source_file": "openai-agents.md"} | [
0.006619572639465332,
-0.08084341138601303,
-0.08123159408569336,
0.01455281674861908,
0.010457184165716171,
-0.0106222378090024,
0.0020483271218836308,
-0.004522796720266342,
-0.04716089367866516,
-0.025862596929073334,
0.044378045946359634,
-0.003061629831790924,
0.09110277891159058,
0.0... |
178e04b3-10bb-43eb-b96f-229e3f43a625 | # Handle both dict and list formats
if isinstance(output, dict):
if output.get('type') == 'text':
text = output['text']
if 'Error' in text:
print(f"❌ Error: {text}")
else:
print(f"✅ Re... | {"source_file": "openai-agents.md"} | [
-0.03106551244854927,
0.09136458486318588,
0.05710892379283905,
0.04228769615292549,
0.08378121256828308,
-0.025183873251080513,
0.029559621587395668,
0.05294932797551155,
-0.03629256412386894,
-0.06440943479537964,
0.05270466208457947,
-0.02204699069261551,
0.024083582684397697,
0.0319993... |
1f5d9a31-45a3-40a2-9c05-91763c893157 | ```
response title="Response"
Running: What's the biggest GitHub project so far in 2025?
🔧 Tool: list_databases({})
✅ Result: amazon
bluesky
country
covid
default
dns
environmental
food
forex
geo
git
github
hackernews
imdb
log...
🔧 Tool: list_tables({"database":"github"})
✅ Result: {
"database": "github",
"name... | {"source_file": "openai-agents.md"} | [
-0.02190508507192135,
-0.056932881474494934,
-0.03743604198098183,
0.04849296435713768,
-0.0027404441498219967,
-0.08712766319513321,
-0.024080336093902588,
-0.000989823485724628,
-0.003913450054824352,
0.050650715827941895,
0.0022138520143926144,
-0.02302616462111473,
0.06153447553515434,
... |
7a6a8829-9449-4a93-a426-c704380b9d3a | slug: /use-cases/AI/MCP/ai-agent-libraries/streamlit-agent
sidebar_label: 'Integrate Streamlit'
title: 'How to build a ClickHouse-backed AI Agent with Streamlit'
pagination_prev: null
pagination_next: null
description: 'Learn how to build a web-based AI Agent with Streamlit and the ClickHouse MCP Server'
keywords: ['Cl... | {"source_file": "streamlit.md"} | [
-0.014788665808737278,
-0.09274639934301376,
-0.04545102268457413,
-0.005203214939683676,
-0.006376657169312239,
-0.011996801011264324,
0.03359031677246094,
-0.004954488016664982,
-0.08229178190231323,
-0.0016255147056654096,
0.012237519025802612,
-0.02595050260424614,
0.06113197281956673,
... |
1c6ca9de-e9cf-4707-9286-0227068d2ac8 | from mcp import ClientSession
import asyncio
import threading
from queue import Queue
```
Define the agent streaming function {#define-agent-function}
Add the main agent function that connects to
ClickHouse's SQL playground
and streams responses:
```python
async def stream_clickhouse_agent(message):
env =... | {"source_file": "streamlit.md"} | [
-0.004474267363548279,
-0.07888577878475189,
-0.08709344267845154,
0.036943480372428894,
-0.09855251014232635,
-0.10211369395256042,
0.04672085493803024,
-0.046525344252586365,
-0.05393773317337036,
-0.04750600829720497,
0.0026323602069169283,
-0.045876823365688324,
0.0275750532746315,
-0.... |
4341eab7-05ac-4752-9f27-c180e109aa9b | if "messages" not in st.session_state:
st.session_state.messages = []
for message in st.session_state.messages:
with st.chat_message(message["role"]):
st.markdown(message["content"])
if prompt := st.chat_input("What is up?"):
st.session_state.messages.append({"role": "user", "content": prompt})
with st.... | {"source_file": "streamlit.md"} | [
0.026233233511447906,
0.03539280593395233,
-0.009204866364598274,
0.0016274149529635906,
-0.03043767251074314,
-0.023209938779473305,
0.0851190984249115,
0.033500220626592636,
-0.03871391341090202,
-0.06477179378271103,
0.02572650834918022,
-0.07233001291751862,
0.006644192151725292,
0.041... |
b1e2a258-ed8a-49d9-b724-797a13092050 | slug: /use-cases/AI/MCP/ai-agent-libraries
title: 'Integrate AI agent libraries with ClickHouse MCP Server'
pagination_prev: null
pagination_next: null
description: 'Learn how to build an AI agent with DSPy and the ClickHouse MCP Server'
keywords: ['ClickHouse', 'Agno', 'Chainlit', 'MCP', 'DSPy', 'LangChain', 'LlamaInd... | {"source_file": "index.md"} | [
-0.01627843640744686,
-0.11416177451610565,
-0.012113616801798344,
-0.01592022366821766,
-0.041792698204517365,
-0.047278400510549545,
0.02260085754096508,
0.011712178587913513,
-0.08802606910467148,
0.01394258439540863,
0.02750321477651596,
-0.05964537709951401,
0.07013747841119766,
0.008... |
9010a87a-2ef2-4934-b71e-2e3c45ab8a2f | slug: /use-cases/AI/MCP/ai-agent-libraries/agno
sidebar_label: 'Integrate Agno'
title: 'How to build an AI Agent with Agno and the ClickHouse MCP Server'
pagination_prev: null
pagination_next: null
description: 'Learn how build an AI Agent with Agno and the ClickHouse MCP Server'
keywords: ['ClickHouse', 'MCP', 'Agno']... | {"source_file": "agno.md"} | [
-0.02519211918115616,
-0.09582974761724472,
-0.03125547245144844,
-0.011954473331570625,
-0.009504846297204494,
-0.025897331535816193,
0.015564140863716602,
0.019777432084083557,
-0.08265143632888794,
0.02402801439166069,
0.008071091026067734,
-0.0001347830839222297,
0.07615350186824799,
-... |
c66d80b9-e8f1-4a2e-a887-eecb7a0c7e04 | response title="Response"
▰▱▱▱▱▱▱ Thinking...
┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ What's the most starred project in 2025?... | {"source_file": "agno.md"} | [
-0.029882753267884254,
-0.056830622255802155,
-0.02949942834675312,
0.05808469280600548,
-0.012556396424770355,
-0.046910762786865234,
0.06819678097963333,
-0.0030890440102666616,
-0.023537691682577133,
0.037080757319927216,
0.01823151856660843,
-0.057387225329875946,
0.09444213658571243,
... |
ebf688e3-a8ee-4293-aa3c-00be290f2527 | ┃ Let me check the available databases and tables first.Thank you for providing the list of databases. I can see ┃
┃ that there's a "github" database, which is likely to contain the information we're looking for. Let's check the ┃
┃ tables in this database.Now that we have information about the tables in the github da... | {"source_file": "agno.md"} | [
-0.048855219036340714,
-0.10404413938522339,
0.01313664298504591,
0.021029289811849594,
0.01791653223335743,
-0.0045860870741307735,
-0.03481718525290489,
0.0019190184539183974,
-0.022544799372553825,
0.023182375356554985,
-0.07987847924232483,
-0.021782217547297478,
0.05932558327913284,
-... |
be5ba2c8-4616-4379-9014-d1e67434033e | slug: /use-cases/AI/MCP/ai-agent-libraries/llamaindex
sidebar_label: 'Integrate LlamaIndex'
title: 'How to build a LlamaIndex AI agent using ClickHouse MCP Server.'
pagination_prev: null
pagination_next: null
description: 'Learn how to build a LlamaIndex AI agent that can interact with ClickHouse MCP Server.'
keywords:... | {"source_file": "llamaindex.md"} | [
-0.03250086307525635,
-0.06688686460256577,
-0.03391721844673157,
-0.009381289593875408,
-0.03325779736042023,
0.008901942521333694,
-0.01916304975748062,
-0.02182060293853283,
-0.047802604734897614,
0.03140433877706528,
-0.0023982070852071047,
-0.016417577862739563,
0.11293170601129532,
0... |
e78466e8-7528-402a-b8d3-31b33a8d314a | agent_worker = FunctionCallingAgentWorker.from_tools(
tools=tools,
llm=llm, verbose=True, max_function_calls=10
)
agent = AgentRunner(agent_worker)
```
Initialize the LLM {#initialize-llm}
Initialize the Claude Sonnet 4.0 model with the following code:
python
from llama_index.llms.anthropic import Anthrop... | {"source_file": "llamaindex.md"} | [
0.01993723213672638,
-0.041766710579395294,
-0.09360917657613754,
0.013046078383922577,
-0.04157499223947525,
-0.07493177056312561,
-0.010675693862140179,
0.020255737006664276,
-0.07607587426900864,
0.04974163696169853,
-0.05555569380521774,
0.003065285738557577,
-0.00457563903182745,
0.00... |
4e86e5b4-5c3b-4378-a50f-9d09fb47dfc8 | slug: /use-cases/AI/MCP/ai-agent-libraries/chainlit
sidebar_label: 'Integrate Chainlit'
title: 'How to build an AI Agent with Chainlit and the ClickHouse MCP Server'
pagination_prev: null
pagination_next: null
description: 'Learn how to use Chainlit to build LLM-based chat apps together with the ClickHouse MCP Server'
... | {"source_file": "chainlit.md"} | [
-0.03590075299143791,
-0.08094072341918945,
0.02281409688293934,
-0.014867962338030338,
-0.03234958276152611,
-0.0496145635843277,
-0.024886051192879677,
0.021904965862631798,
-0.050944339483976364,
-0.007820301689207554,
0.011356402188539505,
-0.014551803469657898,
0.06420440971851349,
0.... |
6dc1259a-c4ec-4f33-9112-dd882ce607c3 | slug: /use-cases/AI/MCP/ai-agent-libraries/crewai
sidebar_label: 'Integrate CrewAI'
title: 'How to build an AI Agent with CrewAI and the ClickHouse MCP Server'
pagination_prev: null
pagination_next: null
description: 'Learn how build an AI Agent with CrewAI and the ClickHouse MCP Server'
keywords: ['ClickHouse', 'MCP',... | {"source_file": "crewai.md"} | [
-0.028316833078861237,
-0.07814119756221771,
-0.06022189185023308,
0.016331473365426064,
-0.03693185746669769,
-0.0002599279396235943,
-0.0021536618005484343,
0.0027152805123478174,
-0.07854034006595612,
0.013729519210755825,
0.04931170493364334,
-0.019130660220980644,
0.1090962290763855,
... |
dd101557-c8ac-4c38-8fc5-c89dba9b9ded | ```response title="Response"
🤖 LiteAgent: MCP Tool User
Status: In Progress
╭─────────────────────────────────────────────────────────── LiteAgent Started ────────────────────────────────────────────────────────────╮
│ ... | {"source_file": "crewai.md"} | [
-0.002214838983491063,
-0.038300804793834686,
-0.009521701373159885,
0.0597672313451767,
-0.08367002755403519,
-0.06195151433348656,
0.0074074529111385345,
-0.016936451196670532,
-0.07065679132938385,
0.06749296188354492,
-0.01038232073187828,
-0.08813556283712387,
0.06294958293437958,
-0.... |
028185a0-a2db-49d1-98d1-6c2684fc7db0 | │ 'type': 'string'}}, 'required': ['query'], 'title': 'DynamicModel', 'type': 'object'} │
│ Tool Description: Run a SELECT query in a ClickHouse database')] │
│ verbose: True ... | {"source_file": "crewai.md"} | [
0.04420165717601776,
-0.015726497396826744,
-0.005992744583636522,
0.13393545150756836,
-0.09972448647022247,
-0.03447447344660759,
0.07882823050022125,
0.017057016491889954,
-0.06124424189329147,
-0.02257830835878849,
0.019603975117206573,
-0.08986811339855194,
0.06138373538851738,
-0.012... |
a8827289-7340-46d6-bafb-abf2e3e698b9 | 🤖 LiteAgent: MCP Tool User
Status: In Progress
└── 🔧 Using list_databases (1)2025-10-10 10:54:25,047 - mcp.server.lowlevel.server - INFO - Processing request of type CallToolRequest
2025-10-10 10:54:25,048 - mcp-clickhouse - INFO - Listing all databases
🤖 LiteAgent: MCP Tool User
Status: In Progress
🤖 LiteAgent: MC... | {"source_file": "crewai.md"} | [
0.051343996077775955,
-0.082151859998703,
0.008700182661414146,
0.03088550828397274,
-0.04712160676717758,
-0.10591975599527359,
0.09908013045787811,
-0.022204777225852013,
-0.09733553975820541,
0.04488898441195488,
0.031008219346404076,
-0.06975439190864563,
0.011174201034009457,
-0.04205... |
0a7072aa-a7ac-4670-ba97-669f80275f04 | │ "logs", "metrica", "mgbench", "mta", "noaa", "nyc_taxi", "nypd", "ontime", "otel", "otel_clickpy", "otel_json", "otel_v2", "pypi", │
│ "random", "rubygems", "stackoverflow", "star_schema", "stock", "system", "tw_weather", "twitter", "uk", "wiki", "words", "youtube"] │
│ ... | {"source_file": "crewai.md"} | [
-0.01546185277402401,
-0.11831745505332947,
0.025156887248158455,
-0.02742871083319187,
0.023537518456578255,
-0.02897798642516136,
0.06364379078149796,
-0.039561159908771515,
0.009397527202963829,
-0.014635385945439339,
0.03792206570506096,
0.0031515881419181824,
0.012321663089096546,
0.0... |
a22c887d-7f19-4e14-bccc-beacfc3ff326 | 🤖 LiteAgent: MCP Tool User
Status: In Progress
├── 🔧 Using list_databases (1)
└── 🧠 Thinking...
╭───────────────────────────────────────────────────────── ✅ Agent Final Answer ──────────────────────────────────────────────────────────╮
│ ... | {"source_file": "crewai.md"} | [
0.03794024884700775,
-0.0693185031414032,
0.06148875504732132,
0.0693795457482338,
0.01201384887099266,
-0.05786241963505745,
0.01926332525908947,
0.01199053879827261,
-0.07851998507976532,
0.060703255236148834,
0.052557531744241714,
-0.06781916320323944,
0.027463937178254128,
-0.033579993... |
a9d09c13-8f09-403b-bf9b-c0e8cbc5c75c | │ - Dec 2024: £643,000 │
│ - Jan 2025: £644,500 │
│ - Feb 2025: £645,200 ... | {"source_file": "crewai.md"} | [
0.033336762338876724,
-0.10547953844070435,
0.02167363464832306,
0.017165884375572205,
-0.024705378338694572,
-0.007693279534578323,
-0.05939287319779396,
0.10223281383514404,
-0.046478379517793655,
0.066173255443573,
0.015955621376633644,
-0.029785985127091408,
0.00035732457763515413,
0.0... |
881e2e98-0253-4608-9bcd-1ba93c14d6cc | │ │
│ Interpretation and notes: │
│ - The HPI shows a steady gradual ri... | {"source_file": "crewai.md"} | [
0.00020487219444476068,
-0.051779717206954956,
0.06142868474125862,
-0.005526633933186531,
0.0024996581487357616,
-0.04834675043821335,
-0.08536311984062195,
0.024796875193715096,
-0.051924142986536026,
-0.021311935037374496,
0.042382754385471344,
-0.0650286003947258,
-0.026362895965576172,
... |
5753813e-bc70-4d77-966a-ddec82f59731 | ✅ LiteAgent: MCP Tool User
Status: Completed
├── 🔧 Using list_databases (1)
└── 🧠 Thinking...
╭────────────────────────────────────────────────────────── LiteAgent Completion ──────────────────────────────────────────────────────────╮
│ ... | {"source_file": "crewai.md"} | [
0.0020225131884217262,
-0.062093544751405716,
0.003871666034683585,
0.050336774438619614,
-0.07490770518779755,
-0.06837166100740433,
0.03303039073944092,
-0.020473504438996315,
-0.0994916632771492,
0.07260604202747345,
0.0020388991106301546,
-0.07750986516475677,
0.08306168019771576,
-0.0... |
7a9a1ab4-8462-48f6-888d-38bcc54498c8 | │ 'type': 'string'}}, 'required': ['query'], 'title': 'DynamicModel', 'type': 'object'} │
│ Tool Description: Run a SELECT query in a ClickHouse database')] │
│ verbose: True ... | {"source_file": "crewai.md"} | [
0.0445375069975853,
-0.017637543380260468,
-0.001676034415140748,
0.13058601319789886,
-0.10351588577032089,
-0.03126787766814232,
0.08112794160842896,
0.014798028394579887,
-0.05802568793296814,
-0.021924547851085663,
0.020625807344913483,
-0.09278678894042969,
0.06522785127162933,
-0.008... |
9e0f9172-5caa-4b8a-8771-d2e1a5568ad9 | title: 'Integrating OpenTelemetry'
description: 'Integrating OpenTelemetry and ClickHouse for observability'
slug: /observability/integrating-opentelemetry
keywords: ['Observability', 'OpenTelemetry']
show_related_blogs: true
doc_type: 'guide'
import observability_3 from '@site/static/images/use-cases/observability... | {"source_file": "integrating-opentelemetry.md"} | [
0.018883945420384407,
0.03121063858270645,
-0.047945793718099594,
0.020916830748319626,
0.04252320155501366,
-0.12507137656211853,
-0.045634184032678604,
0.048968713730573654,
-0.12723630666732788,
-0.006305613089352846,
0.09938747435808182,
-0.025341317057609558,
0.06604190915822983,
0.08... |
3832c836-0177-4f89-8095-3ba6b41fe0be | A ClickHouse-powered Observability solution exploits both of these tools.
Distributions {#distributions}
The OpenTelemetry collector has a
number of distributions
. The filelog receiver along with the ClickHouse exporter, required for a ClickHouse solution, is only present in the
OpenTelemetry Collector Contrib D... | {"source_file": "integrating-opentelemetry.md"} | [
0.014139247126877308,
0.015963012352585793,
-0.03913598135113716,
0.009746454656124115,
0.02429990842938423,
-0.10913942754268646,
0.030050665140151978,
-0.0005716165178455412,
0.017080441117286682,
0.05695817992091179,
0.008605888113379478,
-0.07509100437164307,
0.024792974814772606,
-0.0... |
755cf514-4e7f-4f90-a4d0-4a97809b99fe | The Collector uses the terms
receiver
,
processor
, and
exporter
for its three main processing stages. Receivers are used for data collection and can either be pull or push-based. Processors provide the ability to perform transformations and enrichment of messages. Exporters are responsible for sending the data to ... | {"source_file": "integrating-opentelemetry.md"} | [
-0.028788156807422638,
0.00005907817467232235,
-0.0597805492579937,
0.01319255493581295,
0.010292922146618366,
-0.1451871693134308,
0.01756407506763935,
-0.0026516527868807316,
0.042775046080350876,
0.018727075308561325,
0.0011088241590186954,
-0.0772622600197792,
-0.0010047333780676126,
-... |
ae225201-e9b2-4a7c-85d9-060600ea4d32 | Unstructured logs, while also typically having some inherent structure extractable through a regex pattern, will represent the log purely as a string.
response
54.36.149.41 - - [22/Jan/2019:03:56:14 +0330] "GET
/filter/27|13%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,27|%DA%A9%D9%85%D8%AA%D8%B1%20%D8%A7%D8%B2... | {"source_file": "integrating-opentelemetry.md"} | [
-0.08071017265319824,
0.039315227419137955,
-0.04288730397820473,
0.01960161328315735,
0.032339513301849365,
-0.09925181418657303,
0.0034891392569988966,
-0.01694721169769764,
0.02362070046365261,
0.019343465566635132,
-0.012598251923918724,
-0.027330787852406502,
0.02916504256427288,
0.05... |
1c567e8a-7d98-4a61-b194-9248236d9cc3 | Once installed, the OTel Collector can be run with the following commands:
bash
./otelcol-contrib --config config-logs.yaml
Assuming the use of the structured logs, messages will take the following form on the output:
response
LogRecord #98
ObservedTimestamp: 2024-06-19 13:21:16.414259 +0000 UTC
Timestamp: 2019-0... | {"source_file": "integrating-opentelemetry.md"} | [
0.013348208740353584,
0.005426517687737942,
-0.0354192741215229,
-0.019353069365024567,
-0.03136123716831207,
-0.1009637787938118,
-0.0007176987710408866,
-0.01383951399475336,
0.09266627579927444,
0.03557448461651802,
0.03420756012201309,
-0.12597917020320892,
-0.02829098328948021,
0.0046... |
9dfa516a-083a-4ca0-9684-c6e77c7a3cdf | Collecting Kubernetes logs {#collecting-kubernetes-logs}
For the collection of Kubernetes logs, we recommend the
OpenTelemetry documentation guide
. The
Kubernetes Attributes Processor
is recommended for enriching logs and metrics with pod metadata. This can potentially produce dynamic metadata e.g. labels, stored... | {"source_file": "integrating-opentelemetry.md"} | [
0.03422871604561806,
-0.0035945868585258722,
0.047518495470285416,
-0.024892859160900116,
-0.03786133974790573,
-0.06342831254005432,
0.0632476732134819,
-0.027625873684883118,
0.06646283715963364,
0.01735738106071949,
-0.014304344542324543,
-0.1313115358352661,
-0.04669569432735443,
-0.01... |
1148cb2e-2949-4953-8766-92797ce7fdb5 | Processing - filtering, transforming and enriching {#processing---filtering-transforming-and-enriching}
As demonstrated in the earlier example of setting the timestamp for a log event, users will invariably want to filter, transform, and enrich event messages. This can be achieved using a number of capabilities in Op... | {"source_file": "integrating-opentelemetry.md"} | [
-0.007742323447018862,
0.04589247331023216,
0.038500528782606125,
0.008725559338927269,
-0.015604889951646328,
-0.06657198071479797,
0.03930571675300598,
-0.04250681400299072,
0.07958978414535522,
-0.01398816704750061,
-0.04515252634882927,
-0.09562066197395325,
-0.053086597472429276,
-0.0... |
574c0422-14be-4831-a714-942ac0f604da | config-unstructured-logs-with-processor.yaml
yaml
receivers:
filelog:
include:
- /opt/data/logs/access-unstructured.log
start_at: beginning
operators:
- type: regex_parser
regex: '^(?P<ip>[\d.]+)\s+-\s+-\s+\[(?P<timestamp>[^\]]+)\]\s+"(?P<method>[A-Z]+)\s+(?P<url>[^\s]+)\s+HTTP/[^\s]... | {"source_file": "integrating-opentelemetry.md"} | [
0.011043190956115723,
0.07167001068592072,
0.02603207714855671,
-0.025211188942193985,
0.032481417059898376,
-0.03035927005112171,
0.06003643572330475,
-0.034894105046987534,
0.018658805638551712,
0.04635124281048775,
0.012775938026607037,
-0.005717199295759201,
-0.0008066288428381085,
0.0... |
efa22d8f-e30d-470a-b26a-7221a3dbd882 | Note the following key settings:
pipelines
- The above configuration highlights the use of
pipelines
, consisting of a set of receivers, processors and exporters with one for logs and traces.
endpoint
- Communication with ClickHouse is configured via the
endpoint
parameter. The connection string
tcp://local... | {"source_file": "integrating-opentelemetry.md"} | [
-0.05268076807260513,
0.04469389095902443,
-0.10472200065851212,
-0.004925422370433807,
-0.10152201354503632,
-0.04746067896485329,
-0.02737928368151188,
-0.007127530872821808,
-0.017378967255353928,
0.004271822050213814,
-0.025072989985346794,
0.027468426153063774,
-0.010068699717521667,
... |
ba060b84-f363-4359-9d3b-f9b3b81b6390 | bash
./otelcol-contrib --config clickhouse-config.yaml
To send trace data to this collector, run the following command using the
telemetrygen
tool:
bash
$GOBIN/telemetrygen traces --otlp-insecure --traces 300
Once running, confirm log events are present with a simple query:
```sql
SELECT *
FROM otel_logs
LIMI... | {"source_file": "integrating-opentelemetry.md"} | [
0.03084740601480007,
-0.005778263323009014,
-0.04703196883201599,
-0.01392445620149374,
0.003840559860691428,
-0.14312142133712769,
0.09952156245708466,
-0.03426864370703697,
0.06269323080778122,
0.01954960823059082,
0.08075527101755142,
-0.11018676310777664,
-0.018885023891925812,
-0.0398... |
8d53b107-ae68-4425-b62c-9f12ee446a5a | :::note
In the schemas below we assume TTL has been enabled as 72h.
:::
The default schema for logs is shown below (
otelcol-contrib v0.102.1
):
sql
CREATE TABLE default.otel_logs
(
`Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
`TraceId` String CODEC(ZSTD(1)),
`SpanId` String CODEC(ZSTD(1)),
`... | {"source_file": "integrating-opentelemetry.md"} | [
0.00603431137278676,
0.011488423682749271,
-0.061204180121421814,
0.023875363171100616,
-0.0469849519431591,
-0.08742363750934601,
0.061066415160894394,
0.030082998797297478,
0.008057363331317902,
0.011388221755623817,
0.0390770398080349,
-0.07782653719186783,
0.043156854808330536,
0.01242... |
95510d5f-7e39-4204-a979-9e7bc16866a9 | The table uses the classic
MergeTree
engine
. This is recommended for logs and traces and should not need to be changed.
The table is ordered by
ORDER BY (ServiceName, SeverityText, toUnixTimestamp(Timestamp), TraceId)
. This means queries will be optimized for filters on
ServiceName
,
SeverityText
,
Timestamp
... | {"source_file": "integrating-opentelemetry.md"} | [
-0.02391801029443741,
0.055823177099227905,
0.011343169957399368,
-0.014353088103234768,
0.03790303319692612,
-0.04160148650407791,
0.013885699212551117,
0.04407259821891785,
0.014242715202271938,
0.03725631535053253,
-0.008911540731787682,
0.05990595743060112,
-0.0008421135717071593,
0.02... |
9c51337e-520e-40dc-b63b-ff50fed5d762 | sql
CREATE TABLE default.otel_traces
(
`Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
`TraceId` String CODEC(ZSTD(1)),
`SpanId` String CODEC(ZSTD(1)),
`ParentSpanId` String CODEC(ZSTD(1)),
`TraceState` String CODEC(ZSTD(1)),
`SpanName` LowCardinality(String) CODEC(ZS... | {"source_file": "integrating-opentelemetry.md"} | [
-0.0037696294020861387,
-0.00993402674794197,
-0.042371343821287155,
0.050076715648174286,
-0.07635989040136337,
-0.04196767881512642,
0.06720615178346634,
0.004102262202650309,
-0.06930258870124817,
0.04051389545202255,
0.06389937549829483,
-0.09728023409843445,
0.06957295536994934,
-0.05... |
28aaa712-e121-463c-a1dc-0bcacb48625a | Optimizing inserts {#optimizing-inserts}
In order to achieve high insert performance while obtaining strong consistency guarantees, users should adhere to simple rules when inserting Observability data into ClickHouse via the collector. With the correct configuration of the OTel collector, the following rules should ... | {"source_file": "integrating-opentelemetry.md"} | [
-0.029883308336138725,
-0.03850153461098671,
-0.00739669892936945,
0.03302793949842453,
-0.09249316155910492,
-0.10558084398508072,
-0.033056050539016724,
-0.004505090415477753,
-0.001701687229797244,
0.04865622892975807,
0.02968691848218441,
-0.014785361476242542,
0.05561155080795288,
-0.... |
42df056a-5d61-4291-acf4-62f7d535fca1 | Use asynchronous inserts {#use-asynchronous-inserts}
Typically, users are forced to send smaller batches when the throughput of a collector is low, and yet they still expect data to reach ClickHouse within a minimum end-to-end latency. In this case, small batches are sent when the
timeout
of the batch processor exp... | {"source_file": "integrating-opentelemetry.md"} | [
0.008683153428137302,
-0.043866116553545,
-0.04599780589342117,
0.09718075394630432,
-0.12932738661766052,
-0.05260477215051651,
-0.009761294350028038,
-0.008497118949890137,
0.03510599210858345,
-0.002227372955530882,
0.011883268132805824,
0.028042253106832504,
0.011526907794177532,
-0.07... |
703175a9-2575-46e4-aab8-2ff2b4065b31 | Several deployment architectures are possible when using the OTel collector with Clickhouse. We describe each below and when it is likely applicable.
Agents only {#agents-only}
In an agent only architecture, users deploy the OTel collector as agents to the edge. These receive traces from local applications (e.g. as... | {"source_file": "integrating-opentelemetry.md"} | [
0.014878756366670132,
-0.01460235845297575,
0.011213184334337711,
-0.04699141904711723,
-0.08900881558656693,
-0.08582575619220734,
0.01854858174920082,
-0.029338020831346512,
0.00862492062151432,
0.03005070611834526,
0.00017941482656169683,
-0.04554673656821251,
0.03316919878125191,
-0.03... |
80204e29-458b-41ab-b5c9-766af9d5da33 | The objective of this architecture is to offload computationally intensive processing from the agents, thereby minimizing their resource usage. These gateways can perform transformation tasks that would otherwise need to be done by agents. Furthermore, by aggregating events from many agents, the gateways can ensure lar... | {"source_file": "integrating-opentelemetry.md"} | [
-0.000429674080805853,
-0.004749232437461615,
-0.07457912713289261,
-0.0026668692007660866,
-0.07587495446205139,
-0.08698531240224838,
-0.010963935405015945,
-0.03611460328102112,
0.05365404114127159,
-0.0008059996762312949,
0.011989294551312923,
0.024528326466679573,
-0.009671197272837162,... |
bc3d5915-818a-4da4-b11c-be1b67d5a2ea | Adding Kafka {#adding-kafka}
Readers may notice the above architectures do not use Kafka as a message queue.
Using a Kafka queue as a message buffer is a popular design pattern seen in logging architectures and was popularized by the ELK stack. It provides a few benefits; principally, it helps provide stronger mess... | {"source_file": "integrating-opentelemetry.md"} | [
-0.017081517726182938,
-0.0362655371427536,
-0.060635097324848175,
0.03328770771622658,
-0.036578163504600525,
-0.08805763721466064,
-0.01502940896898508,
-0.027431439608335495,
0.1399603635072708,
0.07552248239517212,
-0.04025387763977051,
0.016158320009708405,
-0.013405059464275837,
-0.0... |
e69f392e-fb16-4460-9ee8-a0fe43401810 | title: 'Managing data'
description: 'Managing data for Observability'
slug: /observability/managing-data
keywords: ['observability', 'logs', 'traces', 'metrics', 'OpenTelemetry', 'Grafana', 'OTel']
show_related_blogs: true
doc_type: 'guide'
import observability_14 from '@site/static/images/use-cases/observability/o... | {"source_file": "managing-data.md"} | [
-0.006123806349933147,
-0.020944610238075256,
-0.0398978628218174,
0.05319506675004959,
0.019475990906357765,
-0.10577511042356491,
0.02314058132469654,
0.024028602987527847,
-0.08066426217556,
0.04543577879667282,
0.05974555015563965,
0.037881139665842056,
0.09552068263292313,
0.066313959... |
d4f13e98-df63-4cc1-b217-81c7d458057c | ┌─partition──┐
│ 2019-01-22 │
│ 2019-01-23 │
│ 2019-01-24 │
│ 2019-01-25 │
│ 2019-01-26 │
└────────────┘
5 rows in set. Elapsed: 0.005 sec.
```
We may have another table,
otel_logs_archive
, which we use to store older data. Data can be moved to this table efficiently by partition (this is just a metadata change).... | {"source_file": "managing-data.md"} | [
-0.00008429199806414545,
-0.006223101168870926,
0.050575219094753265,
0.041566938161849976,
0.020183855667710304,
-0.0918801948428154,
0.039880089461803436,
-0.01863027922809124,
0.03581684082746506,
0.0841541737318039,
0.05164089426398277,
-0.024745207279920578,
-0.020714642480015755,
-0.... |
1c114968-e1b1-4088-8900-75751e4e15c2 | Efficient deletion
- when data has reached a specified TTL (see
Data management with TTL
)
We explore both of these in detail below.
Query performance {#query-performance}
While partitions can assist with query performance, this depends heavily on the access patterns. If queries target only a few partitions (... | {"source_file": "managing-data.md"} | [
-0.06125607714056969,
0.04497792571783066,
0.06610177457332611,
0.018150271847844124,
0.03269246965646744,
-0.054704468697309494,
0.03872441500425339,
-0.003723238129168749,
0.12294463813304901,
-0.04420418292284012,
-0.035767365247011185,
0.06420812010765076,
-0.0010794560657814145,
0.018... |
401e9d2a-b74f-424a-a0b4-ea0c009691d6 | sql
PARTITION BY toDate(Timestamp)
ORDER BY (ServiceName, SpanName, toUnixTimestamp(Timestamp), TraceId)
TTL toDateTime(Timestamp) + toIntervalDay(4)
SETTINGS ttl_only_drop_parts = 1
By default, data with an expired TTL is removed when ClickHouse
merges data parts
. When ClickHouse detects that data is expired, it p... | {"source_file": "managing-data.md"} | [
-0.0038535697385668755,
-0.0869252011179924,
0.023408377543091774,
0.004449000116437674,
-0.05280696600675583,
-0.06450995802879333,
0.024717703461647034,
0.004149258602410555,
0.05873775854706764,
-0.035793427377939224,
0.056354817003011703,
0.04647834971547127,
-0.028706086799502373,
0.0... |
a3839418-bad2-4b54-90f3-6980fd3d260e | :::note
Specifying a column level TTL requires users to specify their own schema. This cannot be specified in the OTel collector.
:::
Recompressing data {#recompressing-data}
While we typically recommend
ZSTD(1)
for observability datasets, users can experiment with different compression algorithms or higher level... | {"source_file": "managing-data.md"} | [
-0.06895484775304794,
0.05995840206742287,
-0.02704525738954544,
0.03623785078525543,
-0.0567624494433403,
-0.07475724071264267,
-0.03762368857860565,
0.018924744799733162,
0.0335116982460022,
-0.006191698834300041,
0.016238223761320114,
-0.008856981061398983,
0.04593397304415703,
-0.01006... |
ea8bde4c-002c-4868-8d27-12535e209aff | While data can be manually moved between disks using the
ALTER TABLE MOVE PARTITION
command, the movement of data between volumes can also be controlled using TTLs. A full example can be found
here
.
Managing schema changes {#managing-schema-changes}
Log and trace schemas will invariably change over the lifetime... | {"source_file": "managing-data.md"} | [
0.02988557331264019,
-0.0732760950922966,
0.010975266806781292,
-0.029582787305116653,
-0.019409796223044395,
-0.04222526773810387,
0.0077772801741957664,
-0.0017815084429457784,
0.0169571153819561,
0.03884818032383919,
0.06563035398721695,
-0.041739217936992645,
0.02468923293054104,
0.004... |
52a8a773-f44d-409f-a5ce-423b7d2ebef6 | CREATE MATERIALIZED VIEW otel_logs_mv TO otel_logs_v2 AS
SELECT
Body,
Timestamp::DateTime AS Timestamp,
ServiceName,
LogAttributes['status']::UInt16 AS Status,
LogAttributes['request_protocol'] AS RequestProtocol,
LogAttributes['run_time'] AS RunTime,
LogAttribute... | {"source_file": "managing-data.md"} | [
0.04987090080976486,
-0.05592219904065132,
-0.008280474692583084,
0.0033241703640669584,
-0.051603980362415314,
-0.05932078883051872,
0.05487065762281418,
-0.017174536362290382,
0.003969699610024691,
0.10195586830377579,
0.05077363923192024,
-0.11146753281354904,
0.039899926632642746,
0.04... |
fde2e0e1-d1f2-400b-829a-4aa66500df6f | 5 rows in set. Elapsed: 0.012 sec.
```
To ensure this value is inserted for all future data, we can modify our materialized view using the
ALTER TABLE
syntax as shown below:
sql
ALTER TABLE otel_logs_mv
MODIFY QUERY
SELECT
Body,
Timestamp::DateTime AS Timestamp,
ServiceName,
... | {"source_file": "managing-data.md"} | [
0.0339999720454216,
-0.02455025352537632,
-0.007469934411346912,
0.015810245648026466,
-0.06817730516195297,
-0.0445893369615078,
0.0667186975479126,
-0.03165503963828087,
0.001812158850952983,
0.11729004234075546,
0.07400556653738022,
-0.11178077757358551,
0.047778114676475525,
-0.0207805... |
38abe1b5-77c7-47ff-bcc0-1a6489001e88 | 5 rows in set. Elapsed: 0.073 sec. Processed 41.46 million rows, 82.92 MB (565.43 million rows/s., 1.13 GB/s.)
```
This can be updated whenever a new table is added using the
EXCHANGE
table syntax. For example, to add a v4 table we can create a new table and exchange this atomically with the previous version.
```... | {"source_file": "managing-data.md"} | [
0.05297038331627846,
-0.09291157126426697,
-0.0004000317712780088,
0.02285916544497013,
-0.042609505355358124,
-0.1176203042268753,
0.020231906324625015,
0.04038044065237045,
0.027987750247120857,
0.12040232121944427,
0.07546090334653854,
-0.005848349537700415,
-0.01856556534767151,
-0.085... |
8a1efafd-b3f0-429b-a77b-c8b8e16b93a1 | title: 'Demo application'
description: 'Demo application for observability'
slug: /observability/demo-application
keywords: ['observability', 'logs', 'traces', 'metrics', 'OpenTelemetry', 'Grafana', 'OTel']
doc_type: 'guide'
The OpenTelemetry project includes a
demo application
. A maintained fork of this applicat... | {"source_file": "demo-application.md"} | [
-0.007741902954876423,
-0.015196927823126316,
-0.03027515672147274,
0.015719909220933914,
0.033987872302532196,
-0.146015927195549,
-0.01331877987831831,
0.018859239295125008,
-0.07346957176923752,
0.04311570152640343,
0.011280344799160957,
-0.0508970245718956,
0.012370391748845577,
0.0351... |
a1f2201e-8cc7-4e90-826e-5c2583a00450 | title: 'Introduction'
description: 'Using ClickHouse as an observability solution'
slug: /use-cases/observability/introduction
keywords: ['observability', 'logs', 'traces', 'metrics', 'OpenTelemetry', 'Grafana', 'OTel']
show_related_blogs: true
doc_type: 'guide'
import observability_1 from '@site/static/images/use-... | {"source_file": "introduction.md"} | [
-0.005748547147959471,
-0.009436273947358131,
-0.06917665153741837,
0.02138472907245159,
0.03144031763076782,
-0.11340748518705368,
0.03783055767416954,
0.03344808146357536,
-0.08866555243730545,
0.04246334731578827,
0.027444152161478996,
0.00008936304220696911,
0.09052282571792603,
0.0822... |
2f5b1299-b19a-498d-bdee-a8d064a75daa | More specifically, the following means ClickHouse is ideally suited for the storage of observability data:
Compression
- Observability data typically contains fields for which the values are taken from a distinct set e.g. HTTP codes or service names. ClickHouse's column-oriented storage, where values are stored so... | {"source_file": "introduction.md"} | [
-0.07164964824914932,
0.013415602035820484,
-0.09147356450557709,
0.026918144896626472,
-0.02747809700667858,
-0.07150129973888397,
-0.02990688383579254,
-0.01975507102906704,
0.018396012485027313,
0.003675039391964674,
-0.010832000523805618,
0.08228891342878342,
0.019642259925603867,
0.01... |
ffb5bc19-15b0-4313-be10-de09132c4e21 | When should you use ClickHouse for Observability {#when-should-you-use-clickhouse-for-observability}
Using ClickHouse for observability data requires users to embrace SQL-based observability. We recommend
this blog post
for a history of SQL-based observability, but in summary:
SQL-based observability is for you i... | {"source_file": "introduction.md"} | [
-0.007129182573407888,
-0.05467681586742401,
-0.07099796831607819,
0.05627165734767914,
-0.020725756883621216,
-0.036076728254556656,
0.018227798864245415,
0.00843273289501667,
-0.03551861271262169,
0.04622867703437805,
-0.0002471271436661482,
-0.006307201460003853,
0.032092370092868805,
0... |
c86ebdaa-8aa4-4c3d-9386-354af8abc892 | Traces
- Traces capture the journey of requests as they traverse through different services in a distributed system, detailing the path and performance of these requests. The data in traces is highly structured, consisting of spans and traces that map out each step a request takes, including timing information. Traces... | {"source_file": "introduction.md"} | [
-0.03467436879873276,
-0.04063333943486214,
-0.05085518956184387,
0.01822970248758793,
0.01701238378882408,
-0.12723855674266815,
0.010640577413141727,
-0.009216244332492352,
0.03369643911719322,
0.0018535183044150472,
-0.03614206984639168,
0.02886839024722576,
-0.0057275425642728806,
0.00... |
9ecf1bd0-e4ed-4f97-bfd6-816582e7e4b2 | slug: /use-cases/observability/build-your-own
title: 'Build Your Own Observability Stack'
pagination_prev: null
pagination_next: null
description: 'Landing page building your own observability stack'
doc_type: 'landing-page'
keywords: ['observability', 'custom stack', 'build your own', 'logs', 'traces', 'metrics', 'Ope... | {"source_file": "index.md"} | [
-0.00867419596761465,
-0.044410984963178635,
-0.01645479165017605,
-0.0028007549699395895,
-0.05580167472362518,
-0.07247485965490341,
-0.07195182144641876,
0.036950305104255676,
-0.04149726405739784,
0.04305211827158928,
-0.006099367514252663,
-0.007495992351323366,
0.03398733213543892,
0... |
cc328510-3339-41c0-aa3d-288649e2985d | title: 'Schema design'
description: 'Designing a schema design for observability'
keywords: ['observability', 'logs', 'traces', 'metrics', 'OpenTelemetry', 'Grafana', 'OTel']
slug: /use-cases/observability/schema-design
show_related_blogs: true
doc_type: 'guide'
import observability_10 from '@site/static/images/use... | {"source_file": "schema-design.md"} | [
0.0002923256834037602,
0.06166791543364525,
-0.058813754469156265,
-0.02217111364006996,
0.012770138680934906,
-0.07887858152389526,
-0.017516067251563072,
0.058623116463422775,
-0.11614536494016647,
0.018798300996422768,
0.05155126005411148,
-0.06405910104513168,
0.08859559893608093,
0.11... |
be4fecc6-4ec2-4c30-9cf0-0c5a0119c252 | We describe each of the above use cases in detail below.
Important:
While users are encouraged to extend and modify their schema to achieve optimal compression and query performance, they should adhere to the OTel schema naming for core columns where possible. The ClickHouse Grafana plugin assumes the existence of s... | {"source_file": "schema-design.md"} | [
-0.05151291936635971,
0.03432662412524223,
-0.03437509015202522,
0.027412081137299538,
0.004786704666912556,
-0.05598403885960579,
-0.009307830594480038,
-0.005764284636825323,
0.014445277862250805,
0.07122907042503357,
0.013364538550376892,
-0.05728646367788315,
-0.001048941514454782,
0.0... |
6612b87b-fb4e-4b37-8166-6d4b05ae8dc6 | ```sql
SELECT path(LogAttributes['request_path']) AS path, count() AS c
FROM otel_logs
WHERE ((LogAttributes['request_type']) = 'POST')
GROUP BY path
ORDER BY c DESC
LIMIT 5
┌─path─────────────────────┬─────c─┐
│ /m/updateVariation │ 12182 │
│ /site/productCard │ 11080 │
│ /site/productPrice │ 1087... | {"source_file": "schema-design.md"} | [
0.09233161807060242,
-0.00815044529736042,
-0.03588187322020531,
0.06654932349920273,
-0.03565629571676254,
-0.09030923992395401,
0.04922515153884888,
0.051218774169683456,
-0.008433843962848186,
0.04268534854054451,
0.018761511892080307,
-0.010904195718467236,
0.029984822496771812,
-0.031... |
3228cad4-f883-4afc-a4f5-514c80195378 | 5 rows in set. Elapsed: 1.953 sec. Processed 10.37 million rows, 3.59 GB (5.31 million rows/s., 1.84 GB/s.)
```
The increased complexity and cost of queries for parsing unstructured logs (notice performance difference) is why we recommend users always use structured logs where possible.
:::note Consider dictionarie... | {"source_file": "schema-design.md"} | [
0.015620783902704716,
0.006112109869718552,
-0.006956254597753286,
-0.005925887729972601,
-0.024995528161525726,
-0.10225969552993774,
0.06293642520904541,
-0.029445676133036613,
0.042337171733379364,
0.05934680625796318,
-0.015889683738350868,
-0.04261600598692894,
-0.00601574033498764,
-... |
991d5bc6-1205-4a14-a0b2-519aa35945d6 | sql
CREATE TABLE otel_logs
(
`Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
`TraceId` String CODEC(ZSTD(1)),
`SpanId` String CODEC(ZSTD(1)),
`TraceFlags` UInt32 CODEC(ZSTD(1)),
`SeverityText` LowCardinality(String) CODEC(ZSTD(1)),
`SeverityNumber` Int32 CODEC(ZSTD(1)... | {"source_file": "schema-design.md"} | [
0.00715435016900301,
0.04730213060975075,
-0.061976078897714615,
0.04156254604458809,
-0.06423404812812805,
-0.07167806476354599,
0.09332229942083359,
0.028850452974438667,
-0.06033538654446602,
0.0630546435713768,
0.03685551509261131,
-0.09478189051151276,
0.07089342176914215,
-0.01508461... |
c578abcb-7543-49aa-bd68-90ada45cd4e0 | :::note Real-time updates
Materialized views in ClickHouse are updated in real time as data flows into the table they are based on, functioning more like continually updating indexes. In contrast, in other databases materialized views are typically static snapshots of a query that must be refreshed (similar to ClickHou... | {"source_file": "schema-design.md"} | [
-0.07797268033027649,
-0.094004325568676,
-0.027322426438331604,
0.06672705709934235,
-0.038965582847595215,
-0.08140397816896439,
0.021599600091576576,
-0.07268186658620834,
0.04000157117843628,
0.031151454895734787,
0.026000529527664185,
-0.021983273327350616,
0.03214423730969429,
-0.065... |
9c9764fd-ab50-4386-bc74-6b25ea326ed3 | ```sql
SELECT
Body,
Timestamp::DateTime AS Timestamp,
ServiceName,
LogAttributes['status'] AS Status,
LogAttributes['request_protocol'] AS RequestProtocol,
LogAttributes['run_time'] AS RunTime,
LogAttributes['size'] AS Size,
LogAttributes['user_agent'] AS... | {"source_file": "schema-design.md"} | [
0.08261305838823318,
-0.01831107772886753,
-0.043765220791101456,
0.00999748706817627,
-0.029585888609290123,
-0.03263432905077934,
0.08348029851913452,
0.018008295446634293,
-0.0143957594409585,
0.08878467977046967,
0.06121623516082764,
-0.11650889366865158,
0.05769035965204239,
-0.006330... |
9a3d37e5-d704-47a1-9fde-8ede978d6ccf | We require a table to receive these results. The below target table matches the above query:
sql
CREATE TABLE otel_logs_v2
(
`Body` String,
`Timestamp` DateTime,
`ServiceName` LowCardinality(String),
`Status` UInt16,
`RequestProtocol` LowCardinality(String),
`RunTime` U... | {"source_file": "schema-design.md"} | [
0.03932754695415497,
0.019116809591650963,
0.021336538717150688,
0.013108670711517334,
-0.06984973698854446,
-0.06172487139701843,
0.012902948074042797,
0.02203770913183689,
-0.015213726088404655,
0.05422689765691757,
0.02752777747809887,
-0.1055995300412178,
-0.006853484082967043,
-0.0160... |
6d788c6d-b32c-40e8-80dd-b9db2c8aba2c | ```sql
SELECT *
FROM otel_logs_v2
LIMIT 1
FORMAT Vertical
Row 1:
──────
Body: {"remote_addr":"54.36.149.41","remote_user":"-","run_time":"0","time_local":"2019-01-22 00:26:14.000","request_type":"GET","request_path":"\/filter\/27|13 ,27| 5 ,p53","request_protocol":"HTTP\/1.1","status":"200","size":"30577",... | {"source_file": "schema-design.md"} | [
-0.016861116513609886,
0.0007094335160218179,
-0.056535981595516205,
0.04437818005681038,
0.004283811431378126,
-0.1149372085928917,
0.06011638417840004,
-0.028565963730216026,
-0.0034288624301552773,
0.06178484484553337,
0.027129290625452995,
-0.07213547825813293,
0.05695512518286705,
-0.... |
89b3e564-7b99-4544-a36a-e27976712389 | If a key doesn't exist in a map, an empty string will be returned. In the case of numerics, users will need to map these to an appropriate value. This can be achieved with
conditionals
e.g.
if(LogAttributes['status'] = ", 200, LogAttributes['status'])
or
cast functions
if default values are acceptable e.g.
toUIn... | {"source_file": "schema-design.md"} | [
0.048902299255132675,
0.05959416925907135,
-0.02452046424150467,
-0.013160059228539467,
-0.04744090512394905,
-0.028647243976593018,
-0.006129169836640358,
0.025594305247068405,
0.002939347643405199,
0.04801207780838013,
0.048729900270700455,
-0.03327716514468193,
0.000475479057058692,
0.0... |
c3a5d4f9-71d4-4181-a61f-20b931bcd792 | GROUP BY
and
ORDER BY
operations for columns in the ordering key can be made more memory efficient.
On identifying the subset of columns for the ordering key, they must be declared in a specific order. This order can significantly influence both the efficiency of the filtering on secondary key columns in queri... | {"source_file": "schema-design.md"} | [
0.03007853776216507,
0.04529426246881485,
0.057547375559806824,
-0.028926340863108635,
0.027686694636940956,
-0.0157148614525795,
-0.0032275288831442595,
-0.06091514974832535,
0.005893534980714321,
0.05674484744668007,
0.04311235994100571,
0.10285144299268723,
0.004387900698930025,
-0.0474... |
709bcdc6-37c0-44a9-b7b6-21922ddb6e11 | sql
CREATE TABLE otel_logs
(
`Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
`TraceId` String CODEC(ZSTD(1)),
`SpanId` String CODEC(ZSTD(1)),
`TraceFlags` UInt32 CODEC(ZSTD(1)),
`SeverityText` LowCardinality(String) CODEC(ZSTD(1)),
`SeverityNumber` Int32 CODEC(ZSTD(1)... | {"source_file": "schema-design.md"} | [
0.00715435016900301,
0.04730213060975075,
-0.061976078897714615,
0.04156254604458809,
-0.06423404812812805,
-0.07167806476354599,
0.09332229942083359,
0.028850452974438667,
-0.06033538654446602,
0.0630546435713768,
0.03685551509261131,
-0.09478189051151276,
0.07089342176914215,
-0.01508461... |
0325648c-fa73-4e3c-80de-6787f05e1c54 | Furthermore, timestamps, while benefiting from delta encoding with respect to compression, have been shown to cause slow query performance if this column is used in the primary/ordering key. We recommend users assess the respective compression vs. query performance tradeoffs.
Using dictionaries {#using-dictionaries}
... | {"source_file": "schema-design.md"} | [
-0.08837708830833435,
0.048242561519145966,
-0.022866614162921906,
0.0016150734154507518,
-0.021879134699702263,
-0.0504387728869915,
0.016296295449137688,
0.00012349573080427945,
0.04752567410469055,
-0.022991353645920753,
0.013911641202867031,
0.030360665172338486,
0.011129764840006828,
... |
5cddd2fd-f5e3-4244-8acf-359d8088e53c | We use the publicly available
DB-IP city-level dataset
provided by
DB-IP.com
under the terms of the
CC BY 4.0 license
.
From
the readme
, we can see that the data is structured as follows:
csv
| ip_range_start | ip_range_end | country_code | state1 | state2 | city | postcode | latitude | longitude | timezone ... | {"source_file": "schema-design.md"} | [
0.06027102470397949,
-0.01838964782655239,
-0.06861548125743866,
0.016964692622423172,
-0.017826316878199577,
-0.032365042716264725,
-0.030089743435382843,
-0.03619634360074997,
-0.028793854638934135,
0.03987175226211548,
0.057298693805933,
-0.0492088682949543,
-0.02161436341702938,
-0.076... |
04785f47-d6dc-435e-94af-2f03cc3f0517 | 4 rows in set. Elapsed: 0.259 sec.
```
:::note
There is a lot going on in the above query. For those interested, read this excellent
explanation
. Otherwise accept the above computes a CIDR for an IP range.
:::
For our purposes, we'll only need the IP range, country code, and coordinates, so let's create a new tab... | {"source_file": "schema-design.md"} | [
0.07842360436916351,
-0.0020580915734171867,
0.006470509339123964,
-0.04402715712785721,
-0.05080331489443779,
-0.04511609300971031,
0.028645461425185204,
-0.054601263254880905,
-0.029084423556923866,
0.0020477655343711376,
0.08105356246232986,
-0.06082122400403023,
0.0356941781938076,
-0.... |
59c89289-52e7-4e74-98c6-7df752fed546 | 1 row in set. Elapsed: 0.003 sec.
```
Notice the retrieval speed here. This allows us to enrich logs. In this case, we choose to
perform query time enrichment
.
Returning to our original logs dataset, we can use the above to aggregate our logs by country. The following assumes we use the schema resulting from our ... | {"source_file": "schema-design.md"} | [
0.05359227582812309,
-0.032157205045223236,
0.011750280857086182,
0.033152855932712555,
-0.0021785576827824116,
-0.12410575151443481,
0.0356554314494133,
-0.06522738933563232,
0.014386115595698357,
0.08364750444889069,
0.0270828939974308,
-0.07796119153499603,
0.031075894832611084,
-0.0262... |
40c0eee1-72bc-41b4-b692-e208e7994bf3 | Using regex dictionaries (user agent parsing) {#using-regex-dictionaries-user-agent-parsing}
The parsing of
user agent strings
is a classical regular expression problem and a common requirement in log and trace based datasets. ClickHouse provides efficient parsing of user agents using Regular Expression Tree Dictio... | {"source_file": "schema-design.md"} | [
0.0030285806860774755,
0.031537704169750214,
0.0022513738367706537,
-0.05467450991272926,
-0.03245285898447037,
-0.024072889238595963,
0.06605753302574158,
-0.05943053960800171,
-0.02328837290406227,
0.02121632546186447,
0.012404089793562889,
-0.05250520631670952,
0.02523103542625904,
0.02... |
23c9fe2c-1a2a-4ce9-906b-89ac31a85d04 | ```sql
CREATE DICTIONARY regexp_os_dict
(
regexp String,
os_replacement String default 'Other',
os_v1_replacement String default '0',
os_v2_replacement String default '0',
os_v3_replacement String default '0',
os_v4_replacement String default '0'
)
PRIMARY KEY regexp
SOUR... | {"source_file": "schema-design.md"} | [
0.010878372006118298,
-0.014891180209815502,
0.02533290535211563,
-0.03713647648692131,
-0.03584536164999008,
-0.04561503231525421,
0.01083575189113617,
-0.009945069439709187,
-0.044309042394161224,
0.01053218450397253,
0.07820736616849899,
-0.06718327105045319,
0.06163152679800987,
-0.035... |
659b826b-7ca0-480a-b521-dd36f0b4e682 | We can either perform this work using a materialized column or using a materialized view. Below we modify the materialized view used earlier:
sql
CREATE MATERIALIZED VIEW otel_logs_mv TO otel_logs_v2
AS SELECT
Body,
CAST(Timestamp, 'DateTime') AS Timestamp,
ServiceName,
LogAttributes['... | {"source_file": "schema-design.md"} | [
0.039623409509658813,
-0.05492101237177849,
-0.04628334939479828,
0.0320223867893219,
-0.05286334082484245,
-0.06060788407921791,
0.07985895872116089,
-0.02189299277961254,
-0.007944557815790176,
0.09156970679759979,
0.030719442293047905,
-0.08306058496236801,
0.05465468764305115,
0.043154... |
da2da3c6-92d1-4795-a870-b1840e24edc7 | ```sql
SELECT Device, Browser, Os
FROM otel_logs_v2
LIMIT 1
FORMAT Vertical
Row 1:
──────
Device: ('Spider','Spider','Desktop')
Browser: ('AhrefsBot','6','1')
Os: ('Other','0','0','0')
```
:::note Tuples for complex structures
Note the use of Tuples for these user agent columns. Tuples are recommended for comp... | {"source_file": "schema-design.md"} | [
0.007970782928168774,
-0.02854318730533123,
-0.05143899470567703,
-0.008398984558880329,
-0.037653032690286636,
-0.1383148580789566,
0.0049334364011883736,
-0.029278218746185303,
-0.043325576931238174,
0.01663867197930813,
0.0171071644872427,
0.05159561336040497,
0.03521638363599777,
-0.03... |
c43f1648-faa6-476b-b01c-d70dc353d8b0 | :::note
This query would be 10x faster if we used the
otel_logs_v2
table, which results from our earlier materialized view, which extracts the size key from the
LogAttributes
map. We use the raw data here for illustrative purposes only and would recommend using the earlier view if this is a common query.
:::
We n... | {"source_file": "schema-design.md"} | [
-0.025600766763091087,
0.0037966431118547916,
0.026378581300377846,
0.014355243183672428,
-0.04486127197742462,
-0.09016823023557663,
0.06313709914684296,
-0.0642305389046669,
-0.022227207198739052,
0.04958677291870117,
0.01839224435389042,
-0.05534118041396141,
0.04593857750296593,
-0.004... |
d95708b3-d16e-4a49-b8f7-af8f2ba4aac8 | Use the
FINAL
modifier
on the table name (which we did for the count query above).
Aggregate by the ordering key used in our final table i.e. Timestamp and sum the metrics.
Typically, the second option is more efficient and flexible (the table can be used for other things), but the first can be simpler for som... | {"source_file": "schema-design.md"} | [
0.0008841686649248004,
0.011043098755180836,
0.06188341975212097,
0.026324961334466934,
-0.039469413459300995,
-0.08058106154203415,
0.08356416970491409,
-0.014539958909153938,
-0.0014425801346078515,
0.02895234525203705,
-0.02976936288177967,
-0.08199243247509003,
0.014082725159823895,
0.... |
728c88d4-2904-4a7b-87ec-1bf8e1144c08 | The associated materialized view uses the earlier query:
sql
CREATE MATERIALIZED VIEW unique_visitors_per_hour_mv TO unique_visitors_per_hour AS
SELECT toStartOfHour(Timestamp) AS Hour,
uniqState(LogAttributes['remote_addr']::IPv4) AS UniqueUsers
FROM otel_logs
GROUP BY Hour
ORDER BY Hour DESC
Note how we a... | {"source_file": "schema-design.md"} | [
-0.018560463562607765,
-0.07428932189941406,
0.019278863444924355,
0.05578294023871422,
-0.09108368307352066,
-0.024757899343967438,
0.04060192033648491,
-0.036501068621873856,
0.04778475686907768,
0.02009604312479496,
0.04671734943985939,
-0.04952485114336014,
0.054916564375162125,
-0.017... |
4862246f-9c43-4a3a-a11e-f113e297b422 | sql
CREATE TABLE otel_traces
(
`Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
`TraceId` String CODEC(ZSTD(1)),
`SpanId` String CODEC(ZSTD(1)),
`ParentSpanId` String CODEC(ZSTD(1)),
`TraceState` String CODEC(ZSTD(1)),
`SpanName` LowCardinality(String) CODEC(ZSTD(1)),
... | {"source_file": "schema-design.md"} | [
-0.013289346359670162,
0.010328780859708786,
-0.03669846057891846,
0.037168100476264954,
-0.07018133252859116,
-0.050124503672122955,
0.06167855113744736,
0.002282294211909175,
-0.07588284462690353,
0.03599228337407112,
0.06238475441932678,
-0.09186715632677078,
0.059832438826560974,
-0.05... |
5b7a29a8-3757-4245-88f5-d066c98bd2f3 | CREATE MATERIALIZED VIEW otel_traces_trace_id_ts_mv TO otel_traces_trace_id_ts
(
TraceId
String,
Start
DateTime64(9),
End
DateTime64(9)
)
AS SELECT
TraceId,
min(Timestamp) AS Start,
max(Timestamp) AS End
FROM otel_traces
WHERE TraceId != ''
GROUP BY TraceId
```
Th... | {"source_file": "schema-design.md"} | [
-0.09305907040834427,
-0.06441224366426468,
-0.05883129686117172,
0.001481280429288745,
-0.07503136992454529,
-0.057119496166706085,
0.007906166836619377,
0.0008554540108889341,
0.02460424415767193,
-0.02001732960343361,
0.02149832434952259,
-0.022479629144072533,
-0.008007007651031017,
-0... |
fe6f06e8-39a4-4c38-8cae-c200701a62f1 | :::note Projections vs Materialized Views
Projections offer many of the same capabilities as materialized views, but should be used sparingly with the latter often preferred. Users should understand the drawbacks and when they are appropriate. For example, while projections can be used for pre-computing aggregations we... | {"source_file": "schema-design.md"} | [
-0.01477589551359415,
-0.0049360040575265884,
-0.06034551188349724,
0.030307721346616745,
-0.033831506967544556,
-0.033608462661504745,
-0.013338153250515461,
0.02038600854575634,
0.05757586285471916,
0.07303530722856522,
-0.04187392070889473,
-0.005531540140509605,
0.03655447065830231,
-0... |
2ce20f7d-89e1-410e-9212-5798a40a5185 | ``sql
SELECT parts_to_do, is_done, latest_fail_reason
FROM system.mutations
WHERE (
table` = 'otel_logs_v2') AND (command LIKE '%MATERIALIZE%')
┌─parts_to_do─┬─is_done─┬─latest_fail_reason─┐
│ 0 │ 1 │ │
└─────────────┴─────────┴────────────────────┘
1 row in set. Elapsed: 0.008 se... | {"source_file": "schema-design.md"} | [
0.0479404591023922,
-0.02995792217552662,
-0.030794084072113037,
0.06004905700683594,
0.015010973438620567,
-0.13052868843078613,
0.06763044744729996,
0.07364202290773392,
0.004440926946699619,
0.08001814037561417,
0.015628302469849586,
0.01039499044418335,
0.07732794433832169,
-0.03763749... |
7a3f3c9c-defe-4216-8e04-6709d1724bc4 | Bloom filters for text search {#bloom-filters-for-text-search}
For Observability queries, secondary indices can be useful when users need to perform text searches. Specifically, the ngram and token-based bloom filter indexes
ngrambf_v1
and
tokenbf_v1
can be used to accelerate searches over String columns with the... | {"source_file": "schema-design.md"} | [
-0.06053901091217995,
0.01928034983575344,
-0.008744871243834496,
0.0295105017721653,
-0.025227192789316177,
-0.017954746261239052,
0.06019769236445427,
-0.024788646027445793,
0.04850127175450325,
-0.039428889751434326,
-0.029699325561523438,
-0.0005948917823843658,
0.07562687247991562,
-0... |
8cecdb9e-4878-4f14-8803-3087a5855a1e | Here we need to match on an ngram size of 3. We therefore create an
ngrambf_v1
index.
sql
CREATE TABLE otel_logs_bloom
(
`Body` String,
`Timestamp` DateTime,
`ServiceName` LowCardinality(String),
`Status` UInt16,
`RequestProtocol` LowCardinality(String),
`RunTime` UIn... | {"source_file": "schema-design.md"} | [
-0.006583705078810453,
-0.002563335234299302,
0.02552848681807518,
-0.02345895580947399,
-0.032115112990140915,
-0.035701408982276917,
0.019380759447813034,
0.04520099237561226,
-0.019893895834684372,
0.02921769954264164,
-0.03489818051457405,
-0.03512983024120331,
-0.03268488869071007,
-0... |
62911bf5-0c60-4f72-8c1e-fe02ffdaa31f | ```sql
EXPLAIN indexes = 1
SELECT count()
FROM otel_logs_v2
WHERE Referer LIKE '%ultra%'
┌─explain────────────────────────────────────────────────────────────┐
│ Expression ((Project names + Projection)) │
│ Aggregating │
│ Expressi... | {"source_file": "schema-design.md"} | [
0.0661727637052536,
-0.028499672189354897,
0.05212895944714546,
0.09776606410741806,
0.021670686081051826,
-0.02859162911772728,
0.07243616878986359,
-0.018304860219359398,
0.025318719446659088,
0.08970549702644348,
0.03604273498058319,
-0.057961370795965195,
0.04202825203537941,
-0.018682... |
a8a706cd-e803-499e-9b9d-95467bd5d4de | ┌─name────┬─compressed_size─┬─uncompressed_size─┬─ratio─┐
│ Referer │ 56.16 MiB │ 789.21 MiB │ 14.05 │
└─────────┴─────────────────┴───────────────────┴───────┘
1 row in set. Elapsed: 0.018 sec.
SELECT
table
,
formatReadableSize(data_compressed_bytes) AS compressed_size,
format... | {"source_file": "schema-design.md"} | [
0.021510278806090355,
0.06791868805885315,
-0.007333012297749519,
0.043279312551021576,
0.013705999590456486,
-0.05124010518193245,
0.011342509649693966,
-0.007247093133628368,
0.012629611417651176,
0.029390884563326836,
-0.009891747497022152,
0.014495901763439178,
0.021853944286704063,
-0... |
a9e13786-4f92-4199-933f-70d2f45a63f3 | title: 'Using Grafana'
description: 'Using Grafana and ClickHouse for observability'
slug: /observability/grafana
keywords: ['Observability', 'logs', 'traces', 'metrics', 'OpenTelemetry', 'Grafana', 'OTel']
show_related_blogs: true
doc_type: 'guide'
import observability_15 from '@site/static/images/use-cases/observ... | {"source_file": "grafana.md"} | [
-0.07183274626731873,
0.02420942857861519,
-0.08258579671382904,
-0.004738661460578442,
-0.011357120238244534,
-0.1269717961549759,
-0.037877559661865234,
0.01061988715082407,
-0.11756175756454468,
0.02238512597978115,
0.08700469136238098,
-0.04323115572333336,
0.05993855372071266,
0.10628... |
e68309ff-38c7-4e15-9142-aaf477641019 | The Logs configuration requires a time, log level, and message column in order for logs to be rendered correctly.
The Traces configuration is slightly more complex (full list
here
). The required columns here are needed such that subsequent queries, which build a full trace profile, can be abstracted. These queries ... | {"source_file": "grafana.md"} | [
-0.03642461821436882,
-0.020832210779190063,
0.00010139469668501988,
0.053693126887083054,
-0.04838220030069351,
-0.08201810717582703,
0.0032640122808516026,
-0.008928066119551659,
0.009166537784039974,
0.040009755641222,
-0.012836349196732044,
-0.06364430487155914,
0.026806922629475594,
0... |
fccf8487-031e-4671-bfca-8af08fc72645 | Users wishing to write more complex queries can switch to the
SQL Editor
.
View trace details {#view-trace-details}
As shown above, Trace ids are rendered as clickable links. On clicking on a trace Id, a user can choose to view the associated spans via the link
View Trace
. This issues the following query (assumi... | {"source_file": "grafana.md"} | [
0.019769931212067604,
-0.04960937425494194,
0.010503888130187988,
0.08793234825134277,
-0.04206139221787453,
-0.020350806415081024,
0.03522641211748123,
-0.03105447255074978,
-0.05899101123213768,
-0.055688854306936264,
0.023424625396728516,
-0.052851468324661255,
0.025803055614233017,
-0.... |
1a497921-1628-4b69-bda6-bd3f560643c6 | sql
SELECT
$__timeInterval(Timestamp) as time,
quantile(0.99)(Duration)/1000000 AS p99
FROM otel_traces
WHERE
$__timeFilter(Timestamp)
AND ( Timestamp >= $__fromTime AND Timestamp <= $__toTime )
GROUP BY time
ORDER BY time ASC
LIMIT 100000
Multi-line charts {#multi-line-charts}
Multi-line charts will be auto... | {"source_file": "grafana.md"} | [
-0.012372570112347603,
-0.03379920870065689,
0.038359634578228,
0.018636588007211685,
-0.03266952559351921,
-0.0440593920648098,
0.06617482751607895,
0.018803341314196587,
0.038858287036418915,
-0.026636093854904175,
0.015799332410097122,
-0.11197395622730255,
-0.011410165578126907,
-0.006... |
c65df631-8e38-481c-8ace-1520e33d19b8 | slug: /use-cases/observability/clickstack/search
title: 'Search with ClickStack'
sidebar_label: 'Search'
pagination_prev: null
pagination_next: null
description: 'Search with ClickStack'
doc_type: 'guide'
keywords: ['clickstack', 'search', 'logs', 'observability', 'full-text search']
import Image from '@theme/Ideal... | {"source_file": "search.md"} | [
0.014356458559632301,
0.02163994498550892,
0.006483068224042654,
0.032570794224739075,
0.04448418691754341,
0.0010704412125051022,
0.05373455584049225,
0.016882399097085,
-0.049197446554899216,
0.0164216086268425,
0.05174276605248451,
0.0011613668175414205,
0.09328845888376236,
0.021574957... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.