awc beta.15
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Aode (lion) 2021-12-28 10:00:26 -06:00
parent 80b1620eed
commit 0cfa95c847
3 changed files with 158 additions and 17 deletions

View file

@ -32,6 +32,7 @@ steps:
trigger:
event:
- tag
- push
- pull_request
@ -64,6 +65,7 @@ steps:
trigger:
event:
- tag
- push
- pull_request
@ -92,9 +94,9 @@ steps:
image: asonix/rust-builder:latest-linux-amd64
pull: always
commands:
- cargo check --target=x86_64-unknown-linux-musl
- cargo check --target=x86_64-unknown-linux-musl --example client --features opentelemetry_0_16
- cargo check --target=x86_64-unknown-linux-musl --example server --features opentelemetry_0_16
- cargo check --target=$TARGET
- cargo check --target=$TARGET --example client --features opentelemetry_0_16
- cargo check --target=$TARGET --example server --features opentelemetry_0_16
trigger:
event:
@ -126,9 +128,9 @@ steps:
image: asonix/rust-builder:latest-linux-arm64v8
pull: always
commands:
- cargo check --target=aarch64-unknown-linux-musl
- cargo check --target=aarch64-unknown-linux-musl --example client --features opentelemetry_0_16
- cargo check --target=aarch64-unknown-linux-musl --example server --features opentelemetry_0_16
- cargo check --target=$TARGET
- cargo check --target=$TARGET --example client --features opentelemetry_0_16
- cargo check --target=$TARGET --example server --features opentelemetry_0_16
trigger:
event:
@ -160,11 +162,150 @@ steps:
image: asonix/rust-builder:latest-linux-arm32v7
pull: always
commands:
- cargo check --target=armv7-unknown-linux-musleabihf
- cargo check --target=armv7-unknown-linux-musleabihf --example client --features opentelemetry_0_16
- cargo check --target=armv7-unknown-linux-musleabihf --example server --features opentelemetry_0_16
- cargo check --target=$TARGET
- cargo check --target=$TARGET --example client --features opentelemetry_0_16
- cargo check --target=$TARGET --example server --features opentelemetry_0_16
trigger:
event:
- push
- pull_request
---
kind: pipeline
type: docker
name: build-amd64
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: build
image: asonix/rust-builder:latest-linux-amd64
pull: always
commands:
- cargo build --target=$TARGET
- cargo build --target=$TARGET --example client --features opentelemetry_0_16
- cargo build --target=$TARGET --example server --features opentelemetry_0_16
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: build-arm64v8
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: build
image: asonix/rust-builder:latest-linux-arm64v8
pull: always
commands:
- cargo build --target=$TARGET
- cargo build --target=$TARGET --example client --features opentelemetry_0_16
- cargo build --target=$TARGET --example server --features opentelemetry_0_16
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: build-arm32v7
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: build
image: asonix/rust-builder:latest-linux-arm32v7
pull: always
commands:
- cargo build --target=$TARGET
- cargo build --target=$TARGET --example client --features opentelemetry_0_16
- cargo build --target=$TARGET --example server --features opentelemetry_0_16
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: publish-crate
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: publish
image: asonix/rust-builder:latest-linux-amd64
pull: always
environment:
CRATES_IO_TOKEN:
from_secret: crates_io_token
commands:
- cargo publish --token $CRATES_IO_TOKEN
depends_on:
- clippy
- tests
- build-amd64
- build-arm64v8
- build-arm32v7
trigger:
event:
- tag

View file

@ -1,7 +1,7 @@
[package]
name = "tracing-awc"
description = "Tracing instrumentation for the awc http client"
version = "0.1.0-beta.15"
version = "0.1.0-beta.16"
authors = ["asonix <asonix@asonix.dog"]
edition = "2018"
license = "AGPL-3.0"
@ -26,9 +26,9 @@ opentelemetry_0_15 = ["opentelemetry_0_15_pkg", "tracing-opentelemetry_0_14_pkg"
opentelemetry_0_16 = ["opentelemetry_0_16_pkg", "tracing-opentelemetry_0_16_pkg"]
[dependencies]
actix-http = { version = "=3.0.0-beta.16", default-features = false }
actix-http = { version = "=3.0.0-beta.17", default-features = false }
actix-service = "2.0.2"
awc = { version = "=3.0.0-beta.14", default-features = false }
awc = { version = "=3.0.0-beta.15", default-features = false }
bytes = "1"
futures-core = "0.3"
opentelemetry_0_13_pkg = { package = "opentelemetry", version = "0.13", optional = true }
@ -47,5 +47,5 @@ actix-rt = "2.5"
actix-web = { version = "4.0.0-beta.15", default-features = false }
opentelemetry-otlp = "0.9"
opentelemetry_0_16_pkg = { package = "opentelemetry", version = "0.16", features = ["rt-tokio"] }
tracing-actix-web = { version = "0.5.0-beta.6", features = ["opentelemetry_0_16"] }
tracing-actix-web = { version = "0.5.0-beta.7", features = ["opentelemetry_0_16"] }
tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "fmt"] }

View file

@ -171,11 +171,11 @@ where
let body_span =
tracing::info_span!(parent: None, "HTTP Client Response Body");
body_span.follows_from(span.id());
let instrumented = InstrumentedBody::new(body_span, payload);
let pinned: Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>>>> =
Box::pin(instrumented);
let payload = InstrumentedBody::new(body_span, payload);
let payload: Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>>>> =
Box::pin(payload);
Payload::Stream(pinned)
Payload::Stream { payload }
}))
}
ConnectResponse::Tunnel(response_head, etc) => {