Open
Description
Component(s)
exporter/doris
What happened?
Description
Doris exporter auto create table is wrong.
Steps to Reproduce
- otel-config.yaml
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
processors:
batch:
timeout: 5s
send_batch_size: 100000
exporters:
clickhouse:
endpoint: tcp://172.20.48.119:9000?dial_timeout=10s&compress=lz4
username: default
database: default
traces_table_name: otel_traces
timeout: 5s
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
sending_queue:
queue_size: 10000
doris:
endpoint: "http://172.20.48.119:38031"
database: otel
username: root
password:
table:
traces: otel_traces
create_schema: true
mysql_endpoint: "172.20.48.119:39031"
history_days: 30
create_history_days: 0
replication_num: 1
timeout: 5s
sending_queue:
enabled: true
queue_size: 10000
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
service:
pipelines:
traces:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouse
- doris
-
docker run -d --name otel-col -p 4317:4317 -p 8888:8888 -v $(pwd)/otel-config.yml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib:0.127.0
-
"docker logs otel-col" found error.
2025-06-10T02:11:40.192Z info [email protected]/collector.go:358 Received signal from OS {"resource": {}, "signal": "terminated"}
2025-06-10T02:11:40.233Z info [email protected]/service.go:331 Starting shutdown... {"resource": {}}
2025-06-10T02:11:40.316Z info extensions/extensions.go:69 Stopping extensions... {"resource": {}}
2025-06-10T02:11:40.316Z info [email protected]/service.go:345 Shutdown complete. {"resource": {}}
2025-06-10T02:11:41.327Z info [email protected]/service.go:199 Setting up own telemetry... {"resource": {}}
2025-06-10T02:11:41.328Z info [email protected]/service.go:266 Starting otelcol-contrib... {"resource": {}, "Version": "0.127.0", "NumCPU": 16}
2025-06-10T02:11:41.328Z info extensions/extensions.go:41 Starting extensions... {"resource": {}}
2025-06-10T02:11:41.462Z error graph/graph.go:438 Failed to start component {"resource": {}, "error": "Error 1105 (HY000): errCode = 2, detailMessage = Time series compaction policy is not supported for unique key table", "type": "Exporter", "id": "doris"}
2025-06-10T02:11:41.462Z info [email protected]/service.go:331 Starting shutdown... {"resource": {}}
2025-06-10T02:11:41.462Z info extensions/extensions.go:69 Stopping extensions... {"resource": {}}
2025-06-10T02:11:41.462Z info [email protected]/service.go:345 Shutdown complete. {"resource": {}}
Error: cannot start pipelines: failed to start "doris" exporter: Error 1105 (HY000): errCode = 2, detailMessage = Time series compaction policy is not supported for unique key table
2025/06/10 02:11:41 collector server run finished with error: cannot start pipelines: failed to start "doris" exporter: Error 1105 (HY000): errCode = 2, detailMessage = Time series compaction policy is not supported for unique key table
The otel_traces table create sql:
CREATE TABLE `otel_traces` (
`service_name` varchar(200) NULL,
`timestamp` datetime(6) NULL,
`service_instance_id` varchar(200) NULL,
`trace_id` varchar(200) NULL,
`span_id` text NULL,
`trace_state` text NULL,
`parent_span_id` text NULL,
`span_name` text NULL,
`span_kind` text NULL,
`end_time` datetime(6) NULL,
`duration` bigint NULL,
`span_attributes` variant NULL,
`events` array<struct<timestamp:datetime(6),name:text,attributes:map<text,text>>> NULL,
`links` array<struct<trace_id:text,span_id:text,trace_state:text,attributes:map<text,text>>> NULL,
`status_message` text NULL,
`status_code` text NULL,
`resource_attributes` variant NULL,
`scope_name` text NULL,
`scope_version` text NULL,
INDEX idx_service_name (`service_name`) USING INVERTED,
INDEX idx_timestamp (`timestamp`) USING INVERTED,
INDEX idx_service_instance_id (`service_instance_id`) USING INVERTED,
INDEX idx_trace_id (`trace_id`) USING INVERTED,
INDEX idx_span_id (`span_id`) USING INVERTED,
INDEX idx_trace_state (`trace_state`) USING INVERTED,
INDEX idx_parent_span_id (`parent_span_id`) USING INVERTED,
INDEX idx_span_name (`span_name`) USING INVERTED,
INDEX idx_span_kind (`span_kind`) USING INVERTED,
INDEX idx_end_time (`end_time`) USING INVERTED,
INDEX idx_duration (`duration`) USING INVERTED,
INDEX idx_span_attributes (`span_attributes`) USING INVERTED,
INDEX idx_status_message (`status_message`) USING INVERTED,
INDEX idx_status_code (`status_code`) USING INVERTED,
INDEX idx_resource_attributes (`resource_attributes`) USING INVERTED,
INDEX idx_scope_name (`scope_name`) USING INVERTED,
INDEX idx_scope_version (`scope_version`) USING INVERTED
) ENGINE=OLAP
DUPLICATE KEY(`service_name`, `timestamp`)
PARTITION BY RANGE(`timestamp`)
(PARTITION p20250610 VALUES [('2025-06-10 00:00:00'), ('2025-06-11 00:00:00')),
PARTITION p20250611 VALUES [('2025-06-11 00:00:00'), ('2025-06-12 00:00:00')))
DISTRIBUTED BY RANDOM BUCKETS AUTO
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-30",
"dynamic_partition.end" = "1",
"dynamic_partition.prefix" = "p",
"dynamic_partition.replication_allocation" = "tag.location.default: 1",
"dynamic_partition.buckets" = "10",
"dynamic_partition.create_history_partition" = "true",
"storage_medium" = "hdd"
);
Expected Result
Actual Result
Collector version
v0.127.0
Environment information
Environment
Doris: v3.0.5
OpenTelemetry Collector configuration
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
processors:
batch:
timeout: 5s
send_batch_size: 100000
exporters:
clickhouse:
endpoint: tcp://172.20.48.119:9000?dial_timeout=10s&compress=lz4
username: default
database: default
traces_table_name: otel_traces
timeout: 5s
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
sending_queue:
queue_size: 10000
doris:
endpoint: "http://172.20.48.119:38031"
database: otel
username: root
password:
table:
traces: otel_traces
create_schema: true
mysql_endpoint: "172.20.48.119:39031"
history_days: 30
create_history_days: 0
replication_num: 1
timeout: 5s
sending_queue:
enabled: true
queue_size: 10000
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
service:
pipelines:
traces:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouse
- doris
Log output
2025-06-10T02:11:40.192Z info [email protected]/collector.go:358 Received signal from OS {"resource": {}, "signal": "terminated"}
2025-06-10T02:11:40.233Z info [email protected]/service.go:331 Starting shutdown... {"resource": {}}
2025-06-10T02:11:40.316Z info extensions/extensions.go:69 Stopping extensions... {"resource": {}}
2025-06-10T02:11:40.316Z info [email protected]/service.go:345 Shutdown complete. {"resource": {}}
2025-06-10T02:11:41.327Z info [email protected]/service.go:199 Setting up own telemetry... {"resource": {}}
2025-06-10T02:11:41.328Z info [email protected]/service.go:266 Starting otelcol-contrib... {"resource": {}, "Version": "0.127.0", "NumCPU": 16}
2025-06-10T02:11:41.328Z info extensions/extensions.go:41 Starting extensions... {"resource": {}}
2025-06-10T02:11:41.462Z error graph/graph.go:438 Failed to start component {"resource": {}, "error": "Error 1105 (HY000): errCode = 2, detailMessage = Time series compaction policy is not supported for unique key table", "type": "Exporter", "id": "doris"}
2025-06-10T02:11:41.462Z info [email protected]/service.go:331 Starting shutdown... {"resource": {}}
2025-06-10T02:11:41.462Z info extensions/extensions.go:69 Stopping extensions... {"resource": {}}
2025-06-10T02:11:41.462Z info [email protected]/service.go:345 Shutdown complete. {"resource": {}}
Error: cannot start pipelines: failed to start "doris" exporter: Error 1105 (HY000): errCode = 2, detailMessage = Time series compaction policy is not supported for unique key table
2025/06/10 02:11:41 collector server run finished with error: cannot start pipelines: failed to start "doris" exporter: Error 1105 (HY000): errCode = 2, detailMessage = Time series compaction policy is not supported for unique key table
Additional context
No response