{"id":111002,"plugin_id":"plugin_asdk_app_6acf6222e5d08191adab0ed24163e768","kind":"skill","collection_source":"plugin_package","comparison_source":"plugin_package","observed_at":"2026-11-23T12:11:06.814Z","digest":"3cbd20161fb74137492f72d25032141c1804556f8f1cd2808106613d9fe2a997","against":71638,"payload":{"description":"Investigates OpenTelemetry logs and traces in Altertable using SQL. Use when analysis involves observability data, including debugging, trace correlation, or joins with business data.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":129}],"name":"investigate-opentelemetry","skill_md_contents":"---\nname: investigate-opentelemetry\ncompatibility: Requires Altertable MCP server\ndescription: \"Investigates OpenTelemetry logs and traces in Altertable using SQL. Use when analysis involves observability data, including debugging, trace correlation, or joins with business data.\"\nmetadata:\n  author: Altertable\n  requires: \"altertable-mcp\"\n---\n\n# Investigate OpenTelemetry Logs and Traces\n\nUse SQL to investigate logs and traces.\n\n## Tables\n\nLogs:\n\n```sql\nopentelemetry.main.logs\n```\n\nTraces:\n\n```sql\nopentelemetry.main.spans\n```\n\n## Narrow the Query\n\nStart with the smallest useful query: time range, environment, service or deployment, then error/trace filters.\n\nSpans and logs are wide: `attributes`, `resource_attributes`, and the span `events` and `links` hold large VARIANT payloads. Never `SELECT *` from them. Select only the columns the question needs, and extract single attributes with `variant_extract`.\n\n## Aggregate First\n\nCount, rate, and rank in SQL over the whole window before reading any rows. A few rows of a busy service rarely contain the incident:\n\n```sql\nSELECT\n  service_name,\n  date_trunc('minute', start_time) AS minute,\n  count(*) AS spans,\n  count(*) FILTER (WHERE status_code = 'STATUS_CODE_ERROR') AS errors,\n  quantile_cont(duration_ns / 1e6, 0.95) AS p95_ms\nFROM opentelemetry.main.spans\nWHERE start_time >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\nGROUP BY ALL\nORDER BY errors DESC, minute\nLIMIT 50;\n```\n\nThen fetch a few example rows or trace IDs from the windows the aggregate points to.\n\n## Filter Attributes\n\nResource attributes are stored in `resource_attributes` VARIANT. Span/log attributes are stored in `attributes` VARIANT.\n\nUse `variant_extract` for filters:\n\n```sql\nvariant_extract(resource_attributes, 'env') = 'production'\nvariant_extract(resource_attributes, 'k8s.pod.name') ILIKE 'api-%'\nvariant_extract(attributes, 'http.method') = 'POST'\nvariant_extract(attributes, 'http.route') = '/graphql'\n```\n\nFor numeric attributes, cast before comparing:\n\n```sql\nTRY_CAST(variant_extract(attributes, 'http.status_code') AS INTEGER) >= 500\n```\n\n## Search Messages\n\nUse the `@@` operator for full text search on indexed columns instead of `LIKE`/`ILIKE`. Only the `message` column is indexed for full text search:\n\n```sql\nmessage @@ 'timeout'\nmessage @@ 'connection refused'\nmessage @@ 'error'\n```\n\n## Filter by Time\n\nUse `timestamp` for log time filters:\n\n```sql\nSELECT timestamp, severity_text, trace_id, message\nFROM opentelemetry.main.logs\nWHERE timestamp >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\n  AND service_name = 'api'\n  AND severity_number >= 17\nORDER BY timestamp DESC\nLIMIT 20;\n```\n\nUse `start_time` for trace time filters:\n\n```sql\nSELECT start_time, trace_id, span_id, name, status_code, duration_ns / 1e6 AS duration_ms\nFROM opentelemetry.main.spans\nWHERE start_time >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\n  AND service_name = 'api'\n  AND status_code = 'STATUS_CODE_ERROR'\nORDER BY start_time DESC\nLIMIT 20;\n```\n\n## Pivot by Trace ID\n\nPivot by `trace_id` when available:\n\n```sql\nSELECT start_time, span_id, parent_span_id, service_name, name, status_code, status_message, duration_ns / 1e6 AS duration_ms\nFROM opentelemetry.main.spans\nWHERE trace_id = '<trace-id>'\nORDER BY start_time ASC;\n```\n\n```sql\nSELECT timestamp, span_id, service_name, severity_text, message\nFROM opentelemetry.main.logs\nWHERE trace_id = '<trace-id>'\nORDER BY timestamp ASC;\n```\n"},"changes":[{"path":"/skill_md_contents","type":"changed","before":"---\nname: investigate-opentelemetry\ncompatibility: Requires Altertable MCP server\ndescription: \"Investigates OpenTelemetry logs and traces in Altertable using SQL. Use when analysis involves observability data, including debugging, trace correlation, or joins with business data.\"\nmetadata:\n  author: Altertable\n  requires: \"altertable-mcp\"\n---\n\n# Investigate OpenTelemetry Logs and Traces\n\nUse SQL to investigate logs and traces.\n\n## Tables\n\nLogs:\n\n```sql\nopentelemetry.main.logs\n```\n\nTraces:\n\n```sql\nopentelemetry.main.spans\n```\n\n## Narrow the Query\n\nStart with the smallest useful query: time range, environment, service or deployment, then error/trace filters.\n\n## Filter Attributes\n\nResource attributes are stored in `resource_attributes` VARIANT. Span/log attributes are stored in `attributes` VARIANT.\n\nUse `variant_extract` for filters:\n\n```sql\nvariant_extract(resource_attributes, 'env') = 'production'\nvariant_extract(resource_attributes, 'k8s.pod.name') ILIKE 'api-%'\nvariant_extract(attributes, 'http.method') = 'POST'\nvariant_extract(attributes, 'http.route') = '/graphql'\n```\n\nFor numeric attributes, cast before comparing:\n\n```sql\nTRY_CAST(variant_extract(attributes, 'http.status_code') AS INTEGER) >= 500\n```\n\n## Search Messages\n\nUse the `@@` operator for full text search on indexed columns instead of `LIKE`/`ILIKE`. Only the `message` column is indexed for full text search:\n\n```sql\nmessage @@ 'timeout'\nmessage @@ 'connection refused'\nmessage @@ 'error'\n```\n\n## Filter by Time\n\nUse `timestamp` for log time filters:\n\n```sql\nSELECT *\nFROM opentelemetry.main.logs\nWHERE timestamp >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\n  AND service_name = 'api'\nORDER BY timestamp DESC\nLIMIT 500;\n```\n\nUse `start_time` for trace time filters:\n\n```sql\nSELECT *\nFROM opentelemetry.main.spans\nWHERE start_time >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\n  AND service_name = 'api'\nORDER BY start_time DESC\nLIMIT 100;\n```\n\n## Pivot by Trace ID\n\nPivot by `trace_id` when available:\n\n```sql\nSELECT *\nFROM opentelemetry.main.spans\nWHERE trace_id = '<trace-id>'\nORDER BY start_time ASC;\n```\n\n```sql\nSELECT *\nFROM opentelemetry.main.logs\nWHERE trace_id = '<trace-id>'\nORDER BY timestamp ASC;\n```\n","after":"---\nname: investigate-opentelemetry\ncompatibility: Requires Altertable MCP server\ndescription: \"Investigates OpenTelemetry logs and traces in Altertable using SQL. Use when analysis involves observability data, including debugging, trace correlation, or joins with business data.\"\nmetadata:\n  author: Altertable\n  requires: \"altertable-mcp\"\n---\n\n# Investigate OpenTelemetry Logs and Traces\n\nUse SQL to investigate logs and traces.\n\n## Tables\n\nLogs:\n\n```sql\nopentelemetry.main.logs\n```\n\nTraces:\n\n```sql\nopentelemetry.main.spans\n```\n\n## Narrow the Query\n\nStart with the smallest useful query: time range, environment, service or deployment, then error/trace filters.\n\nSpans and logs are wide: `attributes`, `resource_attributes`, and the span `events` and `links` hold large VARIANT payloads. Never `SELECT *` from them. Select only the columns the question needs, and extract single attributes with `variant_extract`.\n\n## Aggregate First\n\nCount, rate, and rank in SQL over the whole window before reading any rows. A few rows of a busy service rarely contain the incident:\n\n```sql\nSELECT\n  service_name,\n  date_trunc('minute', start_time) AS minute,\n  count(*) AS spans,\n  count(*) FILTER (WHERE status_code = 'STATUS_CODE_ERROR') AS errors,\n  quantile_cont(duration_ns / 1e6, 0.95) AS p95_ms\nFROM opentelemetry.main.spans\nWHERE start_time >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\nGROUP BY ALL\nORDER BY errors DESC, minute\nLIMIT 50;\n```\n\nThen fetch a few example rows or trace IDs from the windows the aggregate points to.\n\n## Filter Attributes\n\nResource attributes are stored in `resource_attributes` VARIANT. Span/log attributes are stored in `attributes` VARIANT.\n\nUse `variant_extract` for filters:\n\n```sql\nvariant_extract(resource_attributes, 'env') = 'production'\nvariant_extract(resource_attributes, 'k8s.pod.name') ILIKE 'api-%'\nvariant_extract(attributes, 'http.method') = 'POST'\nvariant_extract(attributes, 'http.route') = '/graphql'\n```\n\nFor numeric attributes, cast before comparing:\n\n```sql\nTRY_CAST(variant_extract(attributes, 'http.status_code') AS INTEGER) >= 500\n```\n\n## Search Messages\n\nUse the `@@` operator for full text search on indexed columns instead of `LIKE`/`ILIKE`. Only the `message` column is indexed for full text search:\n\n```sql\nmessage @@ 'timeout'\nmessage @@ 'connection refused'\nmessage @@ 'error'\n```\n\n## Filter by Time\n\nUse `timestamp` for log time filters:\n\n```sql\nSELECT timestamp, severity_text, trace_id, message\nFROM opentelemetry.main.logs\nWHERE timestamp >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\n  AND service_name = 'api'\n  AND severity_number >= 17\nORDER BY timestamp DESC\nLIMIT 20;\n```\n\nUse `start_time` for trace time filters:\n\n```sql\nSELECT start_time, trace_id, span_id, name, status_code, duration_ns / 1e6 AS duration_ms\nFROM opentelemetry.main.spans\nWHERE start_time >= now() - INTERVAL '1 hour'\n  AND variant_extract(resource_attributes, 'env') = 'production'\n  AND service_name = 'api'\n  AND status_code = 'STATUS_CODE_ERROR'\nORDER BY start_time DESC\nLIMIT 20;\n```\n\n## Pivot by Trace ID\n\nPivot by `trace_id` when available:\n\n```sql\nSELECT start_time, span_id, parent_span_id, service_name, name, status_code, status_message, duration_ns / 1e6 AS duration_ms\nFROM opentelemetry.main.spans\nWHERE trace_id = '<trace-id>'\nORDER BY start_time ASC;\n```\n\n```sql\nSELECT timestamp, span_id, service_name, severity_text, message\nFROM opentelemetry.main.logs\nWHERE trace_id = '<trace-id>'\nORDER BY timestamp ASC;\n```\n"}],"summary":"Fields changed: 1. /skill_md_contents.","summary_kind":"deterministic","summary_metadata":{}}