Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix traces doc mapping and udpate otel logs index ID. #4401

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/tutorials/vector-otel-logs/vector.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ method = "post"
inputs = ["remap_syslog"]
encoding.codec = "json"
framing.method = "newline_delimited"
uri = "http://127.0.0.1:7280/api/v1/otel-logs-v0_6/ingest"
uri = "http://127.0.0.1:7280/api/v1/otel-logs-v0_7/ingest"
10 changes: 5 additions & 5 deletions docs/log-management/send-logs/using-vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ search_settings:

## Setup Vector

Our sink here will be Quickwit ingest API `http://127.0.0.1:7280/api/v1/otel-logs-v0_6/ingest`.
Our sink here will be Quickwit ingest API `http://127.0.0.1:7280/api/v1/otel-logs-v0_7/ingest`.
To keep it simple in this tutorial, we will use a log source called `demo_logs` that generates logs in a given format. Let's choose the common `syslog` format
(Vector does not generate logs in the OpenTelemetry format directly!) and use the transform feature to map the `syslog` format into the OpenTelemetry format.

Expand Down Expand Up @@ -178,7 +178,7 @@ method = "post"
inputs = ["remap_syslog"]
encoding.codec = "json"
framing.method = "newline_delimited"
uri = "http://127.0.0.1:7280/api/v1/otel-logs-v0_6/ingest"
uri = "http://127.0.0.1:7280/api/v1/otel-logs-v0_7/ingest"
```
Download the above Vector config file.

Expand All @@ -195,8 +195,8 @@ docker run -v $(pwd)/vector.toml:/etc/vector/vector.toml:ro -p 8383:8383 --net=h
## Search logs

Quickwit is now ingesting logs coming from Vector and you can search them either with `curl` or by using the UI:
- `curl -XGET http://127.0.0.1:7280/api/v1/otel-logs-v0_6/search?query=severity_text:ERROR`
- Open your browser at `http://127.0.0.1:7280/ui/search?query=severity_text:ERROR&index_id=otel-logs-v0_6&max_hits=10` and play with it!
- `curl -XGET http://127.0.0.1:7280/api/v1/otel-logs-v0_7/search?query=severity_text:ERROR`
- Open your browser at `http://127.0.0.1:7280/ui/search?query=severity_text:ERROR&index_id=otel-logs-v0_7&max_hits=10` and play with it!

## Compute aggregation on severity_text

Expand Down Expand Up @@ -227,7 +227,7 @@ Let's craft a nice aggregation query to count how many `INFO`, `DEBUG`, `WARN`,
```

```bash
curl -XPOST -H "Content-Type: application/json" http://127.0.0.1:7280/api/v1/otel-logs-v0_6/search --data @aggregation-query.json
curl -XPOST -H "Content-Type: application/json" http://127.0.0.1:7280/api/v1/otel-logs-v0_7/search --data @aggregation-query.json
```

## Going further
Expand Down
3 changes: 2 additions & 1 deletion quickwit/quickwit-opentelemetry/src/otlp/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use super::{
use crate::otlp::extract_attributes;
use crate::otlp::metrics::OTLP_SERVICE_METRICS;

pub const OTEL_LOGS_INDEX_ID: &str = "otel-logs-v0_6";
pub const OTEL_LOGS_INDEX_ID: &str = "otel-logs-v0_7";

const OTEL_LOGS_INDEX_CONFIG: &str = r#"
version: 0.7
Expand All @@ -68,6 +68,7 @@ doc_mapping:
- name: service_name
type: text
tokenizer: raw
fast: true
- name: severity_text
type: text
tokenizer: raw
Expand Down
1 change: 1 addition & 0 deletions quickwit/quickwit-opentelemetry/src/otlp/traces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ doc_mapping:
- name: service_name
type: text
tokenizer: raw
fast: true
- name: resource_attributes
type: json
tokenizer: raw
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-ui/cypress/e2e/homepage.spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Home navigation', () => {
cy.get('span').should('contain.text', 'cluster_id');
});
it('Should display otel logs index page', () => {
cy.visit('http://127.0.0.1:7280/ui/indexes/otel-logs-v0_6');
cy.visit('http://127.0.0.1:7280/ui/indexes/otel-logs-v0_7');
cy.get('a')
.should('be.visible')
.should('contain.text', 'Indexes')
Expand Down