Skip to content

Commit

Permalink
Merge branch 'master' into bloom-support
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-kolevska committed Jul 18, 2023
2 parents 118f85d + c0ab781 commit bb72354
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
2 changes: 2 additions & 0 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ func (cmd *Cmd) Bool() (bool, error) {

func toBool(val interface{}) (bool, error) {
switch val := val.(type) {
case bool:
return val, nil
case int64:
return val != 0, nil
case string:
Expand Down
2 changes: 1 addition & 1 deletion commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ var _ = Describe("Commands", func() {
// if too much time (>1s) is used during command execution, it may also cause the test to fail.
// so the ObjectIdleTime result should be <=now-start+1s
// link: https://github.com/redis/redis/blob/5b48d900498c85bbf4772c1d466c214439888115/src/object.c#L1265-L1272
Expect(idleTime.Val()).To(BeNumerically("<=", time.Now().Sub(start)+time.Second))
Expect(idleTime.Val()).To(BeNumerically("<=", time.Since(start)+time.Second))
})

It("should Persist", func() {
Expand Down
14 changes: 7 additions & 7 deletions example/otel/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
timeout: 1s
retries: 30
volumes:
- ch_data1:/var/lib/clickhouse
- ch_data2:/var/lib/clickhouse
ports:
- '8123:8123'
- '9000:9000'
Expand All @@ -26,17 +26,17 @@ services:
POSTGRES_PASSWORD: uptrace
POSTGRES_DB: uptrace
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
test: ['CMD-SHELL', 'pg_isready', '-U', 'uptrace', '-d', 'uptrace']
interval: 1s
timeout: 1s
retries: 30
volumes:
- 'pg_data1:/var/lib/postgresql/data/pgdata'
- 'pg_data2:/var/lib/postgresql/data/pgdata'
ports:
- '5432:5432'

uptrace:
image: 'uptrace/uptrace:1.4.7'
image: 'uptrace/uptrace:1.5.0'
#image: 'uptrace/uptrace-dev:latest'
restart: on-failure
volumes:
Expand All @@ -51,7 +51,7 @@ services:
condition: service_healthy

otelcol:
image: otel/opentelemetry-collector-contrib:0.58.0
image: otel/opentelemetry-collector-contrib:0.70.0
restart: on-failure
volumes:
- ./config/otel-collector.yaml:/etc/otelcol-contrib/config.yaml
Expand All @@ -78,5 +78,5 @@ services:
image: redis

volumes:
ch_data1:
pg_data1:
ch_data2:
pg_data2:
26 changes: 13 additions & 13 deletions example/otel/uptrace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,30 @@ metrics_from_spans:
description: Spans duration (excluding events)
instrument: histogram
unit: microseconds
value: span.duration / 1000
value: .duration / 1000
attrs:
- span.system
- span.group_id
- .system
- .group_id
- service.name
- host.name
- span.status_code
- .status_code
annotations:
- span.name
where: not span.is_event
- display.name
where: .event_name = ''

- name: uptrace.tracing.events
description: Events count (excluding spans)
instrument: counter
unit: 1
value: span.count
value: .count
attrs:
- span.system
- span.group_id
- service.name
- .system
- .group_id
- .name
- host.name
annotations:
- span.event_name
where: span.is_event
- display.name
where: .is_event = 1

##
## To require authentication, uncomment one of the following sections.
Expand Down Expand Up @@ -247,7 +247,7 @@ smtp_mailer:
##
## Logging configuration.
##
logs:
logging:
# Zap minimal logging level.
# Valid values: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL.
level: INFO
Expand Down
2 changes: 1 addition & 1 deletion internal/proto/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestReader_ReadLine(t *testing.T) {
t.Errorf("Should be able to read the full buffer: %v", err)
}

if bytes.Compare(read, original[:len(original)-2]) != 0 {
if !bytes.Equal(read, original[:len(original)-2]) {
t.Errorf("Values must be equal: %d expected %d", len(read), len(original[:len(original)-2]))
}
}
Expand Down

0 comments on commit bb72354

Please sign in to comment.