Always send an explicit LIMIT on BanyanDB queries (#13961)

BanyanDB applies its own default limit to any query that carries none --
100 rows for measures, 20 for streams/traces -- and applies it after
GROUP BY, so an over-long result set is silently truncated rather than
rejected.

OAP never sent a limit on several read paths, so an entity-scoped metrics
query returned at most 100 data points regardless of the requested range:
a 4-hour minute-step read rendered only its first 100 minutes and the rest
showed as empty, even though DurationUtils.MAX_TIME_RANGE allows up to 500
steps. The same cap silently shortened topology relation maps, instance
and process metadata lists, profiling thread snapshots and eBPF task lists.

Every BydbQL query now leaves OAP with an explicit LIMIT:

- the entity-scoped metrics read sends the exact number of assembled
  duration points, the same row set the ES/JDBC DAOs fetch by explicit id;
- ad-hoc SELECT TOP sends its own N;
- anything that does not paginate itself falls back to the configured
  resultWindowMaxSize (default 10000) via Conditions#limitIfAbsent, applied
  in the stream/measure/trace query helpers that every DAO funnels through.

The fallback is spliced in at the start of the pagination tail rather than
appended, so it lands ahead of an OFFSET that was set first and keeps
WITH QUERY_TRACE positioned as the grammar requires.

ES and JDBC storage were never affected -- both fetch metrics rows by
explicit document id.
10 files changed
tree: 2fd74b9b2b01a0162c1f7c1dee34bb9078726060
  1. .claude/
  2. .github/
  3. .mvn/
  4. apm-checkstyle/
  5. apm-dist/
  6. apm-protocol/
  7. benchmarks/
  8. changes/
  9. dist-material/
  10. docker/
  11. docs/
  12. oap-server/
  13. oap-server-bom/
  14. test/
  15. tools/
  16. .asf.yaml
  17. .dlc.json
  18. .gitignore
  19. .gitmodules
  20. .licenserc.yaml
  21. CLAUDE.md
  22. codeStyle.xml
  23. CONTRIBUTING.md
  24. HEADER
  25. LICENSE
  26. lombok.config
  27. Makefile
  28. mvnw
  29. mvnw.cmd
  30. NOTICE
  31. pom.xml
  32. README.md
README.md

Apache SkyWalking

SkyWalking: an APM (Application Performance Monitoring) system, especially designed for microservices, cloud native and container-based architectures.

GitHub stars X Follow

GitHub Release

Abstract

SkyWalking is an open-source APM system that provides monitoring, tracing and diagnosing capabilities for distributed systems in Cloud Native architectures.

  • Distributed Tracing
    • End-to-end distributed tracing. Service topology analysis, service-centric observability and APIs dashboards.
  • Agents for your stack
    • Java, .Net Core, PHP, NodeJS, Golang, LUA, Rust, C++, Client JavaScript and Python agents with active development and maintenance.
  • eBPF early adoption
    • Rover agent works as a monitor and profiler powered by eBPF to monitor Kubernetes deployments and diagnose CPU and network performance.
  • Scaling
    • 100+ billion telemetry data could be collected and analyzed from one SkyWalking cluster.
  • Mature Telemetry Ecosystems Supported
    • Metrics, Traces, and Logs from mature ecosystems are supported, e.g. Zipkin, OpenTelemetry, Prometheus, Zabbix, Fluentd
  • Native APM Database
    • BanyanDB, an observability database, created in 2022, aims to ingest, analyze and store telemetry/observability data.
  • Consistent Metrics Aggregation
    • SkyWalking native meter format and widely known metrics format(OpenTelemetry, Telegraf, Zabbix, e.g.) are processed through the same script pipeline.
  • Log Management Pipeline
    • Support log formatting, extract metrics, various sampling policies through script pipeline in high performance.
  • Alerting and Telemetry Pipelines
    • Support service-centric, deployment-centric, API-centric alarm rule setting. Support forwarding alarms and all telemetry data to 3rd party.
  • AI Power Enabled
    • Machine Learning (ML) and Artificial Intelligence (AI) analyze observability data to identify patterns and enhance capabilities, such as recognizing HTTP URI patterns and automatically calculating metric baselines for intelligent alerting, improving anomaly detection.

Live Demo

Documentation

Downloads

Please head to the releases page to download a release of Apache SkyWalking.

Compiling project

Follow this document.

Code of conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please follow the REPORTING GUIDELINES to report unacceptable behavior.

Contact Us

  • Mail list: dev@skywalking.apache.org. Mail to dev-subscribe@skywalking.apache.org, follow the reply to subscribe the mail list.
  • Send Request to join SkyWalking slack mail to the mail list(dev@skywalking.apache.org), we will invite you in.
  • For Chinese speaker, send [CN] Request to join SkyWalking slack mail to the mail list(dev@skywalking.apache.org), we will invite you in.
  • Twitter, ASFSkyWalking
  • bilibili B站 视频
  • 掘金

Our Users

Hundreds of companies and organizations use SkyWalking for research, production, and commercial purposes. Visit our website to find the user page.

License

Apache 2.0 License.