Release Note (3.11.0
)
Release time: 2022-10-24 14:42:35
This release contains 6 new features, 1 bug fix and 10 documentation improvements.
🆕 Features
Add OpenTelemetry tracing and metrics with basic configuration (#5175)
Jina now supports OpenTelemetry Tracing and Metrics libraries for increased observability and instrumentation of Jina Runtimes
. Read the docs (#5291) for details. We also provide a migration guide for a smooth transition from the previously-supported Prometheus-only based metrics instrumentation.
You can integrate Jaeger or other distributed tracing tools to collect and visualize request-level and application level service operation attributes. This helps you analyze request-response lifecycle, application behavior and performance.
from jina import Executor, requests, DocumentArray
class MyExec(Executor):
@requests
def encode(self, docs: DocumentArray, **kwargs):
with self.tracer.start_as_current_span(
'encode', context=tracing_context
) as span:
with self.monitor(
'preprocessing_seconds', 'Time preprocessing the requests'
):
docs.tensors = preprocessing(docs)
with self.monitor(
'model_inference_seconds', 'Time doing inference the requests'
):
docs.embedding = model_inference(docs.tensors)
Record existing Prometheus metrics into OpenTelemetry histograms (#5275)
Prometheus-only based metrics are also available as OpenTelemetry supported metrics. You can switch to OpenTelemetry metrics with little effort.
Add default tracing interceptors to head gRPC connection pool (#5271)
Head Runtime
supports default traces when forwarding requests to the shard replica.
Add gRPC metadata to Executors and Gateway deployments (#5221)
You can now provide HTTP header access tokens as client metadata for accessing external and authentication protected services.
from jina import Client
client = Client(host='api.clip.jina.ai', port=2096, tls=True, protocol='grpc')
client.post(on='/encode', metadata=(('authorization', '<your access token>'),))
Show local location of Executors in Hub (#5282)
Use the list
sub command to list the locations of local Hub Executors:
jina hub list
Dump to Statefulset in K8s when volumes are passed to Executor (#5265)
Jina will generate a Kubernetes Statefulset
manifest for Executors if you provide volumes
to the Flow.to_kubernets_yaml()
method. Executors can persist data on mounted volumes and correctly scale horizontally if required.
🐞 Bug Fixes
Invalid input raises exception (#5141)
- The
client.post()
method was not raising an exception if any of the underlying async requests raised an exception. - The new version correctly raises the exception raised by any async request. The user can now correctly catch any exceptions and act upon the exception.
📗 Documentation Improvements
- Docs for OpenTelemetry instrumentation (#5291)
- Add Jina AI Cloud restructure Jcloud and Hub (#5298)
- Standardize naming conventions (#5285)
- Fix metrics naming (#5277)
- Misc clean up (#5255, #5287, #5284, #5290, #5289, #5288)
🤟 Contributors
We would like to thank all contributors to this release:
- AlaeddineAbdessalem (@alaeddine-13)
- Anthony Le (@AnthonyLe93)
- felix-wang (@numb3r3)
- Girish Chandrashekar (@girishc13)
- zhangkai (@floralatin)
- Joan Fontanals (@JoanFM)
- Johannes Messner (@JohannesMessner)
- samsja (@samsja)
- Han Xiao (@hanxiao)
- Alex Cureton-Griffiths (@alexcg1)
- Andrei Ungureanu (@Andrei997)