├── agent
├── agent-controller
│ ├── README.md
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ └── org.bithon.agent.starter.IAgentService
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── agent
│ │ └── controller
│ │ ├── IAgentControllerFactory.java
│ │ └── cmd
│ │ └── IAgentCommand.java
├── agent-instrumentation
│ ├── src
│ │ ├── test
│ │ │ └── resources
│ │ │ │ └── version.properties
│ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── agent
│ │ │ └── instrumentation
│ │ │ └── aop
│ │ │ ├── debug
│ │ │ └── ProfilingTimestamp.java
│ │ │ └── interceptor
│ │ │ └── descriptor
│ │ │ └── MethodType.java
│ └── README.md
├── agent-core
│ └── src
│ │ ├── test
│ │ └── resources
│ │ │ └── conf
│ │ │ ├── agent.yml
│ │ │ └── external.yml
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── agent
│ │ ├── configuration
│ │ └── IConfigurationChangedListener.java
│ │ └── starter
│ │ └── IAgentShutdownListener.java
├── agent-observability
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ ├── org.bithon.agent.starter.IAgentShutdownListener
│ │ │ └── org.bithon.agent.starter.IAgentService
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── agent
│ │ └── observability
│ │ ├── metric
│ │ ├── model
│ │ │ ├── IMetricValueProvider.java
│ │ │ ├── IMetricValueUpdater.java
│ │ │ ├── InvalidMetricValueException.java
│ │ │ ├── schema
│ │ │ │ ├── IMetricSpec.java
│ │ │ │ └── IDimensionSpec.java
│ │ │ ├── generator
│ │ │ │ └── IAggregateInstanceSupplier.java
│ │ │ ├── IMetricSet.java
│ │ │ ├── Gauge.java
│ │ │ ├── annotation
│ │ │ │ ├── Last.java
│ │ │ │ ├── Max.java
│ │ │ │ ├── Min.java
│ │ │ │ ├── Sum.java
│ │ │ │ └── First.java
│ │ │ ├── IMetricAggregatePredicate.java
│ │ │ └── IMetricAccessor.java
│ │ ├── collector
│ │ │ ├── IMetricCollectorBase.java
│ │ │ └── IMetricCollector3.java
│ │ └── domain
│ │ │ └── httpclient
│ │ │ └── HttpIOMetrics.java
│ │ ├── tracing
│ │ ├── sampler
│ │ │ ├── ISampler.java
│ │ │ └── SamplingMode.java
│ │ ├── context
│ │ │ └── propagation
│ │ │ │ ├── PropagationGetter.java
│ │ │ │ ├── PropagationSetter.java
│ │ │ │ └── ITraceContextInjector.java
│ │ └── id
│ │ │ └── ISpanIdGenerator.java
│ │ ├── utils
│ │ └── filter
│ │ │ └── StringAnyMatcher.java
│ │ └── exporter
│ │ └── IMessageExporter.java
├── agent-plugin-processor
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── javax.annotation.processing.Processor
├── agent-sentinel
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ └── org.bithon.agent.controller.cmd.IAgentCommand
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── agent
│ │ └── sentinel
│ │ ├── flow
│ │ └── CreateFlowRuleRequest.java
│ │ └── expt
│ │ └── SentinelCommandException.java
├── agent-plugins
│ ├── grpc
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ └── org.bithon.agent.plugin.grpc.yml
│ │ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── bithon
│ │ │ │ └── agent
│ │ │ │ └── plugin
│ │ │ │ └── grpc
│ │ │ │ ├── utils
│ │ │ │ └── MessageUtils.java
│ │ │ │ └── ShadedGrpcList.java
│ │ └── pom.xml
│ ├── guice
│ │ ├── src
│ │ │ └── main
│ │ │ │ └── resources
│ │ │ │ └── org.bithon.agent.plugin.guice.yml
│ │ └── pom.xml
│ ├── spring
│ │ ├── webflux
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── resources
│ │ │ │ │ └── org.bithon.agent.plugin.spring.webflux.yml
│ │ │ │ │ └── java
│ │ │ │ │ └── org
│ │ │ │ │ └── bithon
│ │ │ │ │ └── agent
│ │ │ │ │ └── plugin
│ │ │ │ │ └── spring
│ │ │ │ │ └── webflux
│ │ │ │ │ └── context
│ │ │ │ │ └── TracingContextAttributes.java
│ │ │ └── README.md
│ │ ├── bean
│ │ │ └── pom.xml
│ │ ├── webmvc
│ │ │ └── pom.xml
│ │ └── scheduling
│ │ │ └── pom.xml
│ ├── jdbc
│ │ ├── mysql5
│ │ │ ├── README.md
│ │ │ └── src
│ │ │ │ └── test
│ │ │ │ └── resources
│ │ │ │ ├── logback-test.xml
│ │ │ │ └── init-mysql5.sql
│ │ ├── mysql6
│ │ │ └── src
│ │ │ │ └── test
│ │ │ │ └── resources
│ │ │ │ ├── logback-test.xml
│ │ │ │ └── init-mysql6.sql
│ │ ├── mysql8
│ │ │ └── src
│ │ │ │ └── test
│ │ │ │ └── resources
│ │ │ │ ├── logback-test.xml
│ │ │ │ └── init-mysql8.sql
│ │ ├── presto
│ │ │ └── src
│ │ │ │ └── test
│ │ │ │ └── resources
│ │ │ │ └── logback-test.xml
│ │ ├── common
│ │ │ └── pom.xml
│ │ ├── h2
│ │ │ └── pom.xml
│ │ └── postgresql
│ │ │ └── pom.xml
│ ├── bithon-brpc
│ │ ├── src
│ │ │ └── main
│ │ │ │ └── resources
│ │ │ │ └── org.bithon.agent.plugin.bithon.brpc.yml
│ │ └── pom.xml
│ ├── httpclient
│ │ ├── reactor
│ │ │ ├── README.md
│ │ │ └── pom.xml
│ │ ├── jdk
│ │ │ └── pom.xml
│ │ ├── netty3
│ │ │ └── pom.xml
│ │ ├── jetty
│ │ │ └── pom.xml
│ │ ├── okhttp-3.2
│ │ │ └── pom.xml
│ │ ├── apache-httpcomponents4
│ │ │ └── pom.xml
│ │ ├── java-net-http
│ │ │ └── pom.xml
│ │ └── apache-httpcomponents5
│ │ │ └── pom.xml
│ ├── README.md
│ ├── thread-jdk21
│ │ └── pom.xml
│ ├── thread-jdk8
│ │ └── pom.xml
│ ├── thread-jdk9
│ │ └── pom.xml
│ ├── bithon-sdk
│ │ └── pom.xml
│ ├── apache-zookeeper
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── agent
│ │ │ └── plugin
│ │ │ └── apache
│ │ │ └── zookeeper
│ │ │ └── IOMetrics.java
│ ├── netty4
│ │ └── pom.xml
│ ├── jersey
│ │ └── pom.xml
│ ├── openfeign
│ │ └── pom.xml
│ ├── mongodb
│ │ └── pom.xml
│ ├── glassfish
│ │ └── pom.xml
│ ├── logging
│ │ ├── logback
│ │ │ └── pom.xml
│ │ └── log4j2
│ │ │ └── pom.xml
│ ├── redis
│ │ ├── jedis-2.x
│ │ │ └── pom.xml
│ │ ├── jedis-3.x
│ │ │ └── pom.xml
│ │ ├── redisson
│ │ │ └── pom.xml
│ │ └── lettuce-5.x
│ │ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── agent
│ │ │ └── plugin
│ │ │ └── redis
│ │ │ └── lettuce
│ │ │ └── interceptor
│ │ │ ├── AsyncCommand$Cancel.java
│ │ │ └── AsyncCommand$CompleteResult.java
│ ├── httpserver
│ │ ├── netty
│ │ │ └── pom.xml
│ │ └── jetty
│ │ │ └── pom.xml
│ ├── apache-kafka-3.7
│ │ └── pom.xml
│ ├── apache-kafka-3.9
│ │ └── pom.xml
│ └── mongodb-3.8
│ │ └── pom.xml
├── agent-exporter-brpc
│ ├── README.md
│ └── pom.xml
├── agent-sdk
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── agent
│ │ └── sdk
│ │ ├── RAEDME.md
│ │ └── metric
│ │ ├── IMetricValueProvider.java
│ │ └── IMetricValue.java
├── agent-plugins-test
│ └── src
│ │ └── test
│ │ └── resources
│ │ └── logback-test.xml
├── agent-java-adaptor
│ └── agent-java-adaptor-java8
│ │ └── pom.xml
└── agent-distribution
│ └── assemble-plugins.xml
├── server
├── server-starter
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── banner.txt
│ │ │ ├── application-module-alerting.yml
│ │ │ ├── application-module-webapp.yml
│ │ │ ├── application-app-sink.yml
│ │ │ ├── application-all-in-one.yml
│ │ │ ├── application-module-controller.yml
│ │ │ ├── application-module-security.yml
│ │ │ ├── bootstrap.yml
│ │ │ ├── application-module-receiver.yml
│ │ │ └── application-app-collector.yml
│ └── README.md
├── web-service
│ ├── README.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── web
│ │ └── service
│ │ ├── topo
│ │ └── api
│ │ │ └── GetTopoResponse.java
│ │ ├── tracing
│ │ └── api
│ │ │ ├── GetChildSpansRequest.java
│ │ │ ├── ValidateFilterExpressionResponse.java
│ │ │ └── ValidateFilterExpressionRequest.java
│ │ ├── datasource
│ │ └── api
│ │ │ ├── DisplayableText.java
│ │ │ └── UpdateTTLRequest.java
│ │ ├── meta
│ │ └── api
│ │ │ ├── GetApplicationsRequest.java
│ │ │ └── GetMetadataListRequest.java
│ │ └── sentinel
│ │ └── DeleteRuleRequest.java
├── storage-jdbc-mysql
│ └── README.md
├── collector
│ └── src
│ │ └── main
│ │ └── thrift-generated
│ │ └── README.md
├── storage-jdbc-postgresql
│ └── README.md
├── service-discovery
│ ├── client
│ │ └── src
│ │ │ └── main
│ │ │ ├── META-INF
│ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── server
│ │ │ └── discovery
│ │ │ └── client
│ │ │ └── IDiscoveryClient.java
│ └── registration
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── resources
│ │ └── META-INF
│ │ └── spring.factories
├── storage-jdbc-clickhouse
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── spring.factories
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── storage
│ │ └── jdbc
│ │ └── clickhouse
│ │ └── lb
│ │ ├── IShardsUpdateListener.java
│ │ └── ILoadBalancer.java
├── storage-jdbc
│ ├── generate_jooq.sh
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── storage
│ │ └── jdbc
│ │ └── common
│ │ └── IOnceTableWriter.java
├── metric-expression
│ ├── TODO.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── metric
│ │ └── expression
│ │ └── ast
│ │ └── IMetricExpressionVisitor.java
├── pipeline
│ ├── README.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── pipeline
│ │ ├── metrics
│ │ ├── IMetricProcessor.java
│ │ └── exporter
│ │ │ └── IMetricMessageHandler.java
│ │ └── common
│ │ ├── pipeline
│ │ ├── IExporter.java
│ │ └── IReceiver.java
│ │ ├── input
│ │ └── IInputSourceManager.java
│ │ ├── BatchConfig.java
│ │ ├── handler
│ │ └── IMessageHandler.java
│ │ └── transformer
│ │ └── TransformResult.java
├── alerting
│ ├── manager
│ │ ├── alert-query-api.http
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── server
│ │ │ └── alerting
│ │ │ └── manager
│ │ │ ├── security
│ │ │ ├── IUserProvider.java
│ │ │ └── User.java
│ │ │ ├── biz
│ │ │ └── CommandArgs.java
│ │ │ └── api
│ │ │ └── model
│ │ │ ├── UpdateRuleRequest.java
│ │ │ ├── GetRuleFoldersRequest.java
│ │ │ └── GetRuleFoldersResponse.java
│ ├── notification
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── server
│ │ │ └── alerting
│ │ │ └── notification
│ │ │ ├── message
│ │ │ └── format
│ │ │ │ └── INotificationTextLine.java
│ │ │ └── image
│ │ │ └── ImageMode.java
│ ├── common
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── server
│ │ │ └── alerting
│ │ │ └── common
│ │ │ └── model
│ │ │ ├── AlertSeverity.java
│ │ │ ├── IAlertExpressionVisitor.java
│ │ │ └── IAlertInDepthExpressionVisitor.java
│ └── evaluator
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── alerting
│ │ └── evaluator
│ │ └── evaluator
│ │ └── pipeline
│ │ └── IPipelineStep.java
├── server-commons
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── commons
│ │ └── autocomplete
│ │ ├── LexerAndParserFactory.java
│ │ ├── LexerFactory.java
│ │ └── ParserFactory.java
├── datasource
│ ├── common
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── bithon
│ │ │ └── server
│ │ │ └── datasource
│ │ │ ├── query
│ │ │ ├── Order.java
│ │ │ ├── ast
│ │ │ │ └── IASTNode.java
│ │ │ ├── ResultFormat.java
│ │ │ ├── DataRowType.java
│ │ │ ├── pipeline
│ │ │ │ └── IQueryStep.java
│ │ │ └── ColumnMetadata.java
│ │ │ └── aggregator
│ │ │ ├── NumberAggregator.java
│ │ │ ├── LongSumAggregator.java
│ │ │ └── DoubleSumAggregator.java
│ └── reader-jdbc
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── datasource
│ │ └── reader
│ │ └── jdbc
│ │ └── statement
│ │ └── ast
│ │ └── OrderByDirection.java
├── storage
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── storage
│ │ ├── common
│ │ ├── IStorage.java
│ │ └── ApplicationType.java
│ │ ├── alerting
│ │ ├── ObjectAction.java
│ │ └── pojo
│ │ │ └── ListResult.java
│ │ ├── meta
│ │ └── Metadata.java
│ │ ├── event
│ │ ├── IEventReader.java
│ │ ├── IEventWriter.java
│ │ └── Event.java
│ │ └── metrics
│ │ └── IMetricWriter.java
├── web-security
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── server
│ │ └── web
│ │ └── security
│ │ └── IHttpSecurityCustomizer.java
└── agent-controller
│ └── src
│ └── main
│ └── java
│ └── org
│ └── bithon
│ └── server
│ └── agent
│ └── controller
│ └── rbac
│ └── Role.java
├── doc
├── diagnosis
│ ├── assembly.png
│ ├── vm_option.png
│ └── continuous-profiling
│ │ └── preview.png
├── intro
│ └── architecture.png
├── benchmark
│ └── agent
│ │ ├── mem-broker.png
│ │ ├── mem-router.png
│ │ ├── trace-topo.png
│ │ ├── base-cpu-broker.png
│ │ ├── base-cpu-router.png
│ │ ├── mem-historical.png
│ │ ├── base-cpu-historical.png
│ │ ├── rate-100-cpu-broker.png
│ │ ├── rate-100-cpu-router.png
│ │ └── rate-100-cpu-historical.png
├── metrics
│ ├── jvm
│ │ ├── jdk8-xms1g-xmx4g.jpg
│ │ ├── jdk8-xms4g-xmx4g.jpg
│ │ └── jdk17-xms1g-xmx4g.jpg
│ ├── kafka
│ │ ├── kafka-consumer-dashboard.png
│ │ └── kafka-consumer-tracing-logs.png
│ ├── http-outgoing
│ │ ├── step-1-click-icon.png
│ │ ├── step-2-select-time-range.png
│ │ └── step-3-show-tracing-logs.png
│ └── README.md
├── misc
│ ├── rationale
│ │ └── tracing-fragment.png
│ └── comparison
│ │ └── jaeger
│ │ └── jaeger-ui.png
├── dev
│ ├── development.md
│ └── release.md
└── configuration
│ ├── configuration.md
│ └── agent
│ └── plugin
│ └── spring-webflux.md
├── .dockerignore
├── .gitignore
├── .gitmodules
├── component
├── README.md
├── component-brpc
│ └── src
│ │ ├── test
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── bithon
│ │ │ │ └── component
│ │ │ │ └── brpc
│ │ │ │ └── example
│ │ │ │ └── protobuf
│ │ │ │ └── WebRequestMetrics.proto
│ │ └── resources
│ │ │ └── log4j.xml
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── bithon
│ │ └── component
│ │ └── brpc
│ │ ├── endpoint
│ │ ├── IEndPointProvider.java
│ │ └── SingleEndPointProvider.java
│ │ ├── IServiceRegistry.java
│ │ └── exception
│ │ └── ChannelException.java
├── agent-rpc-brpc
│ └── pom.xml
└── component-commons
│ └── src
│ └── main
│ └── java
│ └── org
│ └── bithon
│ └── component
│ └── commons
│ ├── expression
│ ├── IEvaluationContext.java
│ ├── function
│ │ └── IFunctionProvider.java
│ └── validation
│ │ ├── IIdentifierProvider.java
│ │ └── IIdentifier.java
│ └── tracing
│ └── Components.java
├── shaded
└── shaded-protobuf
│ └── src
│ └── main
│ └── proto
│ └── org.bithon.agent.rpc.brpc
│ ├── event
│ └── BrpcEventMessage.proto
│ ├── tracing
│ └── BrpcTraceMessage.proto
│ └── BrpcHeaderMessages.proto
├── dev
├── forbidden-apis-agent.txt
└── checkstyle-header.txt
├── licenses
├── style.xml
└── template.txt
├── setup-hooks.sh
├── hooks
└── pre-push.sh
└── docker
└── startup.sh
/agent/agent-controller/README.md:
--------------------------------------------------------------------------------
1 | Agent control plane
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/web-service/README.md:
--------------------------------------------------------------------------------
1 | # 工程简介
2 |
3 | # 延伸阅读
4 |
5 |
--------------------------------------------------------------------------------
/agent/agent-instrumentation/src/test/resources/version.properties:
--------------------------------------------------------------------------------
1 | v1=1.0.0
2 | v2=0.10.2.0
3 |
--------------------------------------------------------------------------------
/doc/diagnosis/assembly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/diagnosis/assembly.png
--------------------------------------------------------------------------------
/doc/intro/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/intro/architecture.png
--------------------------------------------------------------------------------
/doc/diagnosis/vm_option.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/diagnosis/vm_option.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/mem-broker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/mem-broker.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/mem-router.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/mem-router.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/trace-topo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/trace-topo.png
--------------------------------------------------------------------------------
/doc/metrics/jvm/jdk8-xms1g-xmx4g.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/jvm/jdk8-xms1g-xmx4g.jpg
--------------------------------------------------------------------------------
/doc/metrics/jvm/jdk8-xms4g-xmx4g.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/jvm/jdk8-xms4g-xmx4g.jpg
--------------------------------------------------------------------------------
/agent/agent-core/src/test/resources/conf/agent.yml:
--------------------------------------------------------------------------------
1 |
2 | # This file here is for test cases
3 | test:
4 | prop: "from default file"
--------------------------------------------------------------------------------
/doc/benchmark/agent/base-cpu-broker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/base-cpu-broker.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/base-cpu-router.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/base-cpu-router.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/mem-historical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/mem-historical.png
--------------------------------------------------------------------------------
/doc/metrics/jvm/jdk17-xms1g-xmx4g.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/jvm/jdk17-xms1g-xmx4g.jpg
--------------------------------------------------------------------------------
/doc/misc/rationale/tracing-fragment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/misc/rationale/tracing-fragment.png
--------------------------------------------------------------------------------
/doc/misc/comparison/jaeger/jaeger-ui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/misc/comparison/jaeger/jaeger-ui.png
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .github
2 | .idea
3 | .vscode
4 |
5 | **/target
6 | !server/server-starter/target
7 | !agent/agent-distribution/target
8 |
9 |
--------------------------------------------------------------------------------
/doc/benchmark/agent/base-cpu-historical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/base-cpu-historical.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/rate-100-cpu-broker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/rate-100-cpu-broker.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/rate-100-cpu-router.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/rate-100-cpu-router.png
--------------------------------------------------------------------------------
/server/server-starter/README.md:
--------------------------------------------------------------------------------
1 | This module is the entry point for the server.
2 | It also contains integration tests across different modules.
--------------------------------------------------------------------------------
/agent/agent-controller/src/main/resources/META-INF/services/org.bithon.agent.starter.IAgentService:
--------------------------------------------------------------------------------
1 | org.bithon.agent.controller.AgentControllerService
--------------------------------------------------------------------------------
/doc/diagnosis/continuous-profiling/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/diagnosis/continuous-profiling/preview.png
--------------------------------------------------------------------------------
/doc/metrics/kafka/kafka-consumer-dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/kafka/kafka-consumer-dashboard.png
--------------------------------------------------------------------------------
/doc/benchmark/agent/rate-100-cpu-historical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/benchmark/agent/rate-100-cpu-historical.png
--------------------------------------------------------------------------------
/doc/metrics/http-outgoing/step-1-click-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/http-outgoing/step-1-click-icon.png
--------------------------------------------------------------------------------
/doc/metrics/kafka/kafka-consumer-tracing-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/kafka/kafka-consumer-tracing-logs.png
--------------------------------------------------------------------------------
/doc/metrics/http-outgoing/step-2-select-time-range.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/http-outgoing/step-2-select-time-range.png
--------------------------------------------------------------------------------
/doc/metrics/http-outgoing/step-3-show-tracing-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrankChen021/bithon/HEAD/doc/metrics/http-outgoing/step-3-show-tracing-logs.png
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/resources/META-INF/services/org.bithon.agent.starter.IAgentShutdownListener:
--------------------------------------------------------------------------------
1 | org.bithon.agent.observability.exporter.ExporterShutdown
--------------------------------------------------------------------------------
/agent/agent-plugin-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor:
--------------------------------------------------------------------------------
1 | org.bithon.agent.plugin.processor.PluginMetadataProcessor
2 |
--------------------------------------------------------------------------------
/server/storage-jdbc-mysql/README.md:
--------------------------------------------------------------------------------
1 | This module is only a demonstration of the design of storage layer abstraction.
2 | It can be used at local development but not for production.
--------------------------------------------------------------------------------
/agent/agent-core/src/test/resources/conf/external.yml:
--------------------------------------------------------------------------------
1 |
2 | # This file here is for test cases
3 | test:
4 | prop: "from external file"
5 | arrayList:
6 | - "from file a"
7 |
--------------------------------------------------------------------------------
/agent/agent-instrumentation/README.md:
--------------------------------------------------------------------------------
1 | ### NOTE
2 |
3 | Classes in this project are loaded by bootstrap class loader.
4 |
5 | Make sure there are no other dependencies in this project.
--------------------------------------------------------------------------------
/server/collector/src/main/thrift-generated/README.md:
--------------------------------------------------------------------------------
1 | Files under this directory are auto generated by IDL here:
2 | https://github.com/jaegertracing/jaeger-idl/blob/main/thrift/jaeger.thrift
3 |
--------------------------------------------------------------------------------
/server/storage-jdbc-postgresql/README.md:
--------------------------------------------------------------------------------
1 | This module currently is only for the agent module `jdbc-postgresql` development and verification,
2 | it's NOT ready for the server side development.
3 |
--------------------------------------------------------------------------------
/server/service-discovery/client/src/main/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | org.bithon.server.discovery.client.DiscoveryClientAutoConfiguration
--------------------------------------------------------------------------------
/agent/agent-sentinel/src/main/resources/META-INF/services/org.bithon.agent.controller.cmd.IAgentCommand:
--------------------------------------------------------------------------------
1 | org.bithon.agent.sentinel.flow.FlowRuleManagerImpl
2 | org.bithon.agent.sentinel.degrade.DegradingRuleManagerImpl
--------------------------------------------------------------------------------
/server/service-discovery/registration/src/main/java/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | org.bithon.server.discovery.registration.DiscoveryRegistration
--------------------------------------------------------------------------------
/server/storage-jdbc-clickhouse/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | org.bithon.server.storage.jdbc.clickhouse.ClickHouseStorageAutoConfiguration
--------------------------------------------------------------------------------
/agent/agent-plugins/grpc/src/main/resources/org.bithon.agent.plugin.grpc.yml:
--------------------------------------------------------------------------------
1 | agent:
2 | plugin:
3 | grpc:
4 | shaded:
5 | - org.apache.ratis.thirdparty.io.grpc
6 | - com.alibaba.nacos.shaded.io.grpc
--------------------------------------------------------------------------------
/agent/agent-exporter-brpc/README.md:
--------------------------------------------------------------------------------
1 | This module provides an implementation of agent exporter over the BRPC protocol,
2 | which is a protobuf and JSON based RPC protocol.
3 |
4 | See [brpc](../../component/component-brpc/) to learn more.
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/resources/META-INF/services/org.bithon.agent.starter.IAgentService:
--------------------------------------------------------------------------------
1 | org.bithon.agent.observability.tracing.dynamic.DynamicInstrumentationService
2 | org.bithon.agent.observability.jvm.JvmMonitorService
3 |
--------------------------------------------------------------------------------
/doc/metrics/README.md:
--------------------------------------------------------------------------------
1 | This directory contains all documents for metrics provided by Bithon.
2 |
3 | - [HTT Outgoing Metric Set](http-outgoing/README.md)
4 | - [JVM Metric Set](jvm/README.md)
5 | - [Kafka Consumer Metric Set](kafka/kafka-consumer.md)
6 | - to be continued
--------------------------------------------------------------------------------
/agent/agent-plugins/guice/src/main/resources/org.bithon.agent.plugin.guice.yml:
--------------------------------------------------------------------------------
1 | agent:
2 | plugin:
3 | guice:
4 | disabled: false
5 | bean:
6 | excludedClasses:
7 | - type: endwith
8 | suffix: DruidAvaticaJsonHandler
9 |
10 |
--------------------------------------------------------------------------------
/server/storage-jdbc/generate_jooq.sh:
--------------------------------------------------------------------------------
1 | echo 'Importing database schema'
2 | mysql -u root < src/main/resources/database.sql
3 | echo 'Importing alerting database schema'
4 | mysql -u root < src/main/resources/database-alerting.sql
5 | echo 'Generating Jooq classes'
6 | mvn jooq-codegen:generate
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /agent/dest/
2 | /**/target/
3 | /.idea/
4 | **/*.iml
5 | /**/.settings/
6 | /**/.classpath
7 | /**/.project
8 | /**/.sts4-cache/
9 | **/dependency-reduced-pom.xml
10 | /logs/
11 | /.vscode/
12 |
13 |
14 | /server/web-server/src/main/resources/static/bower_components/
15 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "server/jOOQ"]
2 | path = server/jOOQ
3 | url = https://github.com/FrankChen021/jOOQ.git
4 | [submodule "server/opentelemetry/opentelemetry-proto"]
5 | path = server/opentelemetry/opentelemetry-proto
6 | url = https://github.com/FrankChen021/opentelemetry-proto.git
7 |
--------------------------------------------------------------------------------
/component/README.md:
--------------------------------------------------------------------------------
1 | # NOTE
2 |
3 | This directory contains modules that can be shared with the agent and server side modules.
4 |
5 | Since modules are used by agent, all modules under this directory can only use JDK standard API,
6 | **it MUST contain no other third party dependencies, Or there might be libs conflicts.**
--------------------------------------------------------------------------------
/shaded/shaded-protobuf/src/main/proto/org.bithon.agent.rpc.brpc/event/BrpcEventMessage.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package org.bithon.agent.rpc.brpc.event;
4 |
5 | option java_multiple_files = true;
6 |
7 | message BrpcEventMessage {
8 | int64 timestamp = 1;
9 | string eventType = 2;
10 | string jsonArguments = 3;
11 | }
12 |
--------------------------------------------------------------------------------
/server/metric-expression/TODO.md:
--------------------------------------------------------------------------------
1 | ## Must to be done
2 | - [ ] Fix the Grammar to move predicate after arithmetic expression
3 | - [ ] Unify evaluator in the alerting module
4 |
5 | ## Optimization
6 | - [ ] Push the literal computation to the storage layer
7 | - [ ] Push the metrics in the same data source and with same GROUP-BY/Label-Selector to the storage layer
--------------------------------------------------------------------------------
/agent/agent-plugins/spring/webflux/src/main/resources/org.bithon.agent.plugin.spring.webflux.yml:
--------------------------------------------------------------------------------
1 | agent:
2 | plugin:
3 | spring:
4 | webflux:
5 | gateway:
6 | org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter:
7 | mode: before
8 | org.springframework.cloud.gateway.filter.NettyRoutingFilter:
9 | mode: around
10 |
11 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql5/README.md:
--------------------------------------------------------------------------------
1 | ## Test Case
2 |
3 | The test cases requires docker to run a mysql5 container.
4 | If colima is used, set these environment variables to your IDE(e.g. IntelliJ) run configuration:
5 |
6 | ```shell
7 | DOCKER_HOST=unix://$HOME$/.colima/docker.sock
8 | TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=$HOME$/.colima/docker.sock"
9 | TESTCONTAINERS_RYUK_DISABLED=true
10 | ```
--------------------------------------------------------------------------------
/agent/agent-sdk/src/main/java/org/bithon/agent/sdk/RAEDME.md:
--------------------------------------------------------------------------------
1 | # Version Strategy
2 |
3 | When a new API is added, follow the steps below:
4 | 1. Add the new API in the latest version package, e.g. `org.bithon.agent.sdk.tracing.ISpanScopeV2`.
5 | 2. Declare this V2 to be sub-interface of the previous version, e.g. `ISpanScopeV2 extends ISpanScopeV1`.
6 | 3. Change the parent interface of ISpanScope to the latest version, e.g. `ISpanScope extends ISpanScopeV2`.
7 |
--------------------------------------------------------------------------------
/dev/forbidden-apis-agent.txt:
--------------------------------------------------------------------------------
1 | @defaultMessage in Agent, threads MUST be daemon threads. Use #daemonThreadFactory instead
2 | org.bithon.component.commons.concurrency.NamedThreadFactory#nonDaemonThreadFactory(java.lang.String)
3 |
4 | @defaultMessage Use org.bithon.agent.instrumentation.aop.interceptor.matcher#implements for better performance
5 | org.bithon.shaded.net.bytebuddy.matcher.ElementMatchers#isOverriddenFrom(org.bithon.shaded.net.bytebuddy.matcher.ElementMatcher)
--------------------------------------------------------------------------------
/component/component-brpc/src/test/java/org/bithon/component/brpc/example/protobuf/WebRequestMetrics.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package org.bithon.component.brpc.example.protobuf;
4 |
5 | option java_multiple_files = true;
6 |
7 | message WebRequestMetrics {
8 | string uri = 1;
9 | int64 costNanoTime = 2;
10 | int64 requests = 3;
11 | int64 count4xx = 4;
12 | int64 count5xx = 5;
13 | int64 requestBytes = 6;
14 | int64 responseBytes = 7;
15 | }
16 |
--------------------------------------------------------------------------------
/doc/dev/development.md:
--------------------------------------------------------------------------------
1 |
2 | # Setup hooks to check code style before push
3 |
4 | ```bash
5 | sh setup-hooks.sh
6 | ```
7 | # Add License Header for new files
8 |
9 | All source code files require license header.
10 |
11 | You should either copy the license from licenses/template.txt to the newly added source file,
12 | or execute the following command to add license header automatically.
13 |
14 | ```bash
15 | mvn com.mycila:license-maven-plugin:format -T 1C
16 | ```
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-module-alerting.yml:
--------------------------------------------------------------------------------
1 | # This configuration file demonstrates the alerting deployment in one process.
2 | bithon:
3 | alerting:
4 | evaluator:
5 | enabled: true
6 | scheduler:
7 | cron: 15 0/1 * 1/1 * ?
8 | # Where the evaluator module uses the notification services
9 | notification-service: discovery
10 | manager:
11 | enabled: true
12 | allow-anonymous: true
13 | notification:
14 | enabled: true
15 |
--------------------------------------------------------------------------------
/agent/agent-plugins/bithon-brpc/src/main/resources/org.bithon.agent.plugin.bithon.brpc.yml:
--------------------------------------------------------------------------------
1 | agent:
2 | plugin:
3 | bithon:
4 | brpc:
5 | providers:
6 | org.bithon.server.collector.brpc.BrpcMetricCollector: org.bithon.agent.rpc.brpc.metrics.IMetricCollector
7 | org.bithon.server.collector.brpc.BrpcEventCollector: org.bithon.agent.rpc.brpc.event.IEventCollector
8 | org.bithon.server.collector.brpc.BrpcTraceCollector: org.bithon.agent.rpc.brpc.tracing.ITraceCollector
9 |
10 |
--------------------------------------------------------------------------------
/agent/agent-plugins-test/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql5/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql6/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql8/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/presto/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/licenses/style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /*
5 | *
6 | */EOL
7 | (\s|\t)*/\*.*$
8 | .*\*/(\s|\t)*$
9 | true
10 | true
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/shaded/shaded-protobuf/src/main/proto/org.bithon.agent.rpc.brpc/tracing/BrpcTraceMessage.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package org.bithon.agent.rpc.brpc.tracing;
4 |
5 | option java_multiple_files = true;
6 |
7 | message BrpcTraceSpanMessage {
8 | string traceId = 1;
9 | string spanId = 2;
10 | optional string parentSpanId = 3;
11 | optional string parentAppName = 4;
12 | string kind = 5;
13 | string name = 6;
14 | string clazz = 7;
15 | string method = 8;
16 | map tags = 9;
17 | int64 startTime = 10;
18 | int64 endTime = 11;
19 | }
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-module-webapp.yml:
--------------------------------------------------------------------------------
1 | # This property must exist to enable the webapp module
2 | bithon:
3 | web:
4 | service:
5 | enabled: true
6 |
7 | #
8 | # Some web-server configurations
9 | # Not mandatory
10 | #
11 | server:
12 | port: 9897
13 | compression:
14 | enabled: true
15 | min-response-size: 4096
16 | mime-types:
17 | - application/json
18 | - application/xml
19 | - text/html
20 | - text/xml
21 | - text/plain
22 | - application/octet-stream
23 | - text/event-stream # Enable compression for SSE
24 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-app-sink.yml:
--------------------------------------------------------------------------------
1 | #
2 | # This file demonstrates how to deploy the pipeline module independently to receive data from Kafka topics
3 | # and sink them into local storage.
4 | # The web-service is also enabled in this application to provide query service, it's optional.
5 | #
6 | spring:
7 | config:
8 | import:
9 | # Note: the controller module is optional to be deployed with the collector module.
10 | - classpath:application-module-pipeline-from-kafka.yml
11 | - classpath:application-module-storage-h2.yml
12 | - classpath:application-module-webapp.yml
13 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-all-in-one.yml:
--------------------------------------------------------------------------------
1 | #
2 | # This all-in-one profile is just an example.
3 | # It combines other profiles to enable all modules in a single application.
4 | #
5 | spring:
6 | config:
7 | import:
8 | - classpath:application-module-controller.yml
9 | - classpath:application-module-receiver.yml
10 | - classpath:application-module-pipeline-to-local.yml
11 | - classpath:application-module-storage-h2.yml
12 | - classpath:application-module-webapp.yml
13 | - classpath:application-module-alerting.yml
14 | - classpath:application-module-security.yml
15 |
--------------------------------------------------------------------------------
/component/component-brpc/src/test/resources/log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/licenses/template.txt:
--------------------------------------------------------------------------------
1 | Copyright 2020 bithon.org
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-module-controller.yml:
--------------------------------------------------------------------------------
1 | bithon:
2 | agent-controller:
3 | enabled: true
4 | port: 9899
5 | channel:
6 | low-water-mark: 128KiB
7 | high-water-mark: 256KiB
8 | permission:
9 | # The following define a global rule to ALLOW any operation from any user.
10 | # Refer to the PermissionConfig to know more about the configuration
11 | enabled: true
12 | rbac:
13 | users:
14 | - name: "anonymousUser"
15 | permissions:
16 | - operation: RW
17 | resource: "*"
18 | application: "*"
19 |
20 |
--------------------------------------------------------------------------------
/dev/checkstyle-header.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/reactor/README.md:
--------------------------------------------------------------------------------
1 |
2 | To know how the reactor httpclient works,
3 | it's better to read the NettyRoutingFilter implementation in SpringWebFlux(since 3.0.0) first.
4 |
5 | The below is the code from NettyRoutingFilter implementation in SpringWebFlux(since 3.0.0),
6 | it helps us to understand how the agent in this plugin works.
7 |
8 | ```java
9 | Flux responseFlux = getHttpClient(route, exchange)
10 | .headers(headers -> {
11 | ...
12 | }).request(method).uri(url).send((req, nettyOutbound) -> {
13 |
14 | return nettyOutbound.send(request.getBody().map(this::getByteBuf));
15 | }).responseConnection((res, connection) -> {
16 |
17 | return ...
18 | });
19 | ```
20 |
--------------------------------------------------------------------------------
/doc/configuration/configuration.md:
--------------------------------------------------------------------------------
1 |
2 | ## Agent Configuration
3 |
4 | See [Here](agent/README.md)
5 |
6 | ## Server Configuration
7 |
8 | 1. Use Nacos as configuration center and service discovery registry
9 | - [Nacos](server/configuration-nacos.md)
10 |
11 | 2. Configure receivers that receive trace/metrics/events data from clients
12 | - [Collector](server/configuration-collector.md)
13 |
14 | 3. Configure using ClickHouse or supported DBMS as storage to store metrics/tracing/events data
15 | - [Storage](server/configuration-storage.md)
16 |
17 | 4. Special Configuration for tracing
18 | - [Tracing](server/configuration-tracing.md)
19 |
20 | 5. Dashboard Configuration
21 |
22 | - [Dashboard](webapp/configuration-dashboard.md)
--------------------------------------------------------------------------------
/server/pipeline/README.md:
--------------------------------------------------------------------------------
1 | This module is responsible for the data processing.
2 | It accepts data from a receiver and then applies processors/transformers to the data,
3 | and then export data to downstream.
4 |
5 | The receiver currently can be the Bithon's brpc collector or a Kafka cluster.
6 | The exporter now can be either a persistent storage or a Kafka.
7 |
8 | Typically, in production, we deploy two pipelines as two applications:
9 | 1. brpc collector with Kafka. The collector receives data and then push data to a Kafka cluster
10 | 2. The other pipeline consumes data from above Kafka, and then push the data to persistent storages.
11 |
12 | For local development,
13 | we can deploy one pipeline that consumes data from the brpc collector and then store them in storages.
--------------------------------------------------------------------------------
/agent/agent-plugins/README.md:
--------------------------------------------------------------------------------
1 |
2 | ## Specification
3 |
4 | ### Plugin
5 |
6 | - The artifact name of each plugin defined in the `pom.xml` must be in the form of `agent-plugin-xxx`.
7 |
8 | ### Plugin class
9 |
10 | - Each plugin must provide a class that implements `org.bithon.agent.core.plugin.IPlugin` interface.
11 | - The name of each plugin class must end with `Plugin`, e.g `HttpClientPlugin`.
12 | - Ot
13 |
14 | ### Dependencies
15 |
16 | The scope of dependencies declared in the `pom.xml` of each plugin must be defined as `provided`.
17 |
18 | #### Declaration
19 |
20 | - Each plugin must be defined in the `pom.xml` of `agent-plugins` as a module.
21 | - Each plugin must be declared in the `` section so that they can be packed correctly in the distribution.
22 |
--------------------------------------------------------------------------------
/server/alerting/manager/alert-query-api.http:
--------------------------------------------------------------------------------
1 |
2 | ### Get Alert list
3 | POST http://localhost:9897/api/alerting/alert/list
4 | Content-Type: application/json
5 |
6 | {
7 | }
8 |
9 | ### Get Change logs
10 | POST http://localhost:9897/api/alerting/alert/change-log/get
11 | Content-Type: application/json
12 |
13 | {
14 | "alertId": "f7f87ce1e0b444919b123849f4c7939e"
15 | }
16 |
17 | ### Get alert record list
18 | POST http://localhost:9897/api/alerting/alert/record/list
19 | Content-Type: application/json
20 |
21 | {
22 | "alertId": "16a5ff9d09bf4ab2811185720ace4b24"
23 | }
24 |
25 | ### Get alert record list
26 | POST http://localhost:9897/api/alerting/alert/record/list
27 | Content-Type: application/json
28 |
29 | {
30 | "alertId": "16a5ff9d09bf4ab2811185720ace4b24"
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-module-security.yml:
--------------------------------------------------------------------------------
1 | bithon:
2 | web:
3 | security:
4 | enabled: false
5 | jwtTokenSignKey: BithonIsAObservabilityPlatformThatMakesUEasy11
6 | jwtTokenValiditySeconds: 86400
7 | oauth2:
8 | client:
9 | registration:
10 | google:
11 | # https://medium.com/geekculture/springboot-api-authentication-using-oauth2-with-google-655b8759f0ac
12 | # Above article contains information about how to register an application at Google to use OAuth2
13 | clientId: xxx
14 | clientSecret: yyy
15 | redirectUri: http://localhost:9897/login/oauth2/code/google
16 | scope:
17 | - email
18 | - profile
--------------------------------------------------------------------------------
/component/agent-rpc-brpc/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | org.bithon.component
7 | component-all
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | 4.0.0
12 | agent-rpc-brpc
13 |
14 |
15 |
16 | org.bithon.component
17 | component-brpc
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/shaded/shaded-protobuf/src/main/proto/org.bithon.agent.rpc.brpc/BrpcHeaderMessages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package org.bithon.agent.rpc.brpc;
4 |
5 | option java_multiple_files = true;
6 |
7 | enum ApplicationType {
8 | /**
9 | * enum must start from 0
10 | */
11 | JAVA = 0;
12 | }
13 |
14 | /***************************************************************************/
15 | /*************************** MessageHeader ***************************/
16 | /***************************************************************************/
17 | message BrpcMessageHeader {
18 | string appName = 1;
19 | string env = 2;
20 | string instanceName = 3;
21 | /*The follow two fields are deprecated*/
22 | /*string hostIp = 4;*/
23 | /*int32 port = 5;*/
24 | ApplicationType appType = 6;
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-plugins/bithon-brpc/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-bithon-brpc
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 |
19 |
20 | ${project.artifactId}
21 |
22 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/jdk/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-httpclient-jdk
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 |
19 |
20 | ${project.artifactId}
21 |
22 |
--------------------------------------------------------------------------------
/component/component-brpc/src/main/java/org/bithon/component/brpc/endpoint/IEndPointProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.brpc.endpoint;
18 |
19 | public interface IEndPointProvider {
20 |
21 | EndPoint getEndpoint();
22 | }
23 |
--------------------------------------------------------------------------------
/doc/configuration/agent/plugin/spring-webflux.md:
--------------------------------------------------------------------------------
1 |
2 | ## Example Configurations
3 |
4 | ```yml
5 | agent:
6 | plugin:
7 | spring:
8 | webflux:
9 | response:
10 | headers:
11 | HEADER_NAME: TAG_NAME_IN_SPAN
12 | gateway:
13 | org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter:
14 | mode: before
15 | org.springframework.cloud.gateway.filter.NettyRoutingFilter:
16 | mode: around
17 | ```
18 |
19 | - agent.plugin.spring.webflux.gateway
20 |
21 | This configuration configures users' Spring Gateway Filter classes to be instrumented
22 |
23 | - agent.plugin.spring.webflux.response.headers
24 |
25 | A map that specifies which headers in the HTTP Response should be logged in the `tags` of span log.
26 |
27 | - key, the HEADER name in the HTTP response.
28 | - val, the tag name in the span log.
29 |
--------------------------------------------------------------------------------
/setup-hooks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -eu
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | ln -s ../../hooks/pre-push.sh .git/hooks/pre-push
18 |
--------------------------------------------------------------------------------
/agent/agent-plugins/thread-jdk21/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-thread-jdk21
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-plugin-thread-jdk
17 | ${project.version}
18 |
19 |
20 |
21 |
22 | ${project.artifactId}
23 |
24 |
--------------------------------------------------------------------------------
/agent/agent-plugins/thread-jdk8/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-thread-jdk8
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-plugin-thread-jdk
17 | ${project.version}
18 |
19 |
20 |
21 |
22 | ${project.artifactId}
23 |
24 |
--------------------------------------------------------------------------------
/agent/agent-plugins/thread-jdk9/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-thread-jdk9
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-plugin-thread-jdk
17 | ${project.version}
18 |
19 |
20 |
21 |
22 | ${project.artifactId}
23 |
24 |
--------------------------------------------------------------------------------
/server/server-commons/src/main/java/org/bithon/server/commons/autocomplete/LexerAndParserFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.commons.autocomplete;
18 |
19 | public interface LexerAndParserFactory extends LexerFactory, ParserFactory {
20 | }
21 |
--------------------------------------------------------------------------------
/agent/agent-sentinel/src/main/java/org/bithon/agent/sentinel/flow/CreateFlowRuleRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.sentinel.flow;
18 |
19 | import org.bithon.agent.rpc.brpc.sentinel.FlowRuleDto;
20 |
21 | class CreateFlowRuleRequest extends FlowRuleDto {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/query/Order.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.query;
18 |
19 | /**
20 | * @author Frank Chen
21 | * @date 29/8/23 8:57 pm
22 | */
23 | public enum Order {
24 | desc,
25 | asc
26 | }
27 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/common/IStorage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.common;
18 |
19 | /**
20 | * @author Frank Chen
21 | * @date 10/3/23 11:35 pm
22 | */
23 | public interface IStorage {
24 |
25 | String getName();
26 | }
27 |
--------------------------------------------------------------------------------
/hooks/pre-push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -eu
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | mvn checkstyle:checkstyle com.mycila:license-maven-plugin:check -T 1C --fail-at-end
18 |
--------------------------------------------------------------------------------
/server/alerting/notification/src/main/java/org/bithon/server/alerting/notification/message/format/INotificationTextLine.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.notification.message.format;
18 |
19 | public interface INotificationTextLine {
20 | String getType();
21 | }
22 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/query/ast/IASTNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.query.ast;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2022/9/4 15:03
22 | */
23 | public interface IASTNode {
24 | }
25 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/metrics/IMetricProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.metrics;
18 |
19 | public interface IMetricProcessor extends AutoCloseable {
20 | void process(String messageType, SchemaMetricMessage message);
21 | }
22 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/topo/api/GetTopoResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.topo.api;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/3/20 21:40
22 | */
23 | public class GetTopoResponse {
24 | }
25 |
--------------------------------------------------------------------------------
/agent/agent-sdk/src/main/java/org/bithon/agent/sdk/metric/IMetricValueProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.sdk.metric;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 6/10/21 1:05 pm
22 | */
23 | public interface IMetricValueProvider {
24 | long value();
25 | }
26 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/common/pipeline/IExporter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.common.pipeline;
18 |
19 | /**
20 | * The source of processing pipeline
21 | */
22 | public interface IExporter {
23 | void start();
24 |
25 | void stop();
26 | }
27 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/common/pipeline/IReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.common.pipeline;
18 |
19 | /**
20 | * The source of processing pipeline
21 | */
22 | public interface IReceiver {
23 | void start();
24 |
25 | void stop();
26 | }
27 |
--------------------------------------------------------------------------------
/agent/agent-sdk/src/main/java/org/bithon/agent/sdk/metric/IMetricValue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.sdk.metric;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021-10-01
22 | */
23 | public interface IMetricValue extends IMetricValueProvider {
24 | long update(long v);
25 | }
26 |
--------------------------------------------------------------------------------
/doc/dev/release.md:
--------------------------------------------------------------------------------
1 | The artifacts are published to https://central.sonatype.com/ (FrankChen021)
2 |
3 | # Step 1. Configure authentication in settings.xml
4 |
5 | Goto https://central.sonatype.com/ to get token.
6 |
7 | ```xml
8 |
9 | central
10 | YOUR_NAME
11 | YOUR_PASSWORD
12 |
13 | ```
14 |
15 | # Step2. make sure there is GPG private keys on your server
16 |
17 | ## generate a key
18 | If there is no GPG private key, use following command to generate your key
19 | ```bash
20 | gpg --full-generate-key
21 | ```
22 |
23 | ## export public key
24 |
25 | ```bash
26 | (gpg --list-sigs YOUR_KEY_ID && gpg --armor --export YOUR_KEY_ID) > KEY
27 | ```
28 |
29 | ## upload key
30 |
31 | Upload your key to [opengpg](https://keys.openpgp.org/upload/)
32 |
33 | # Step 3. Build and deploy agent to sonatype
34 |
35 | ```bash
36 | export GPG_TTY=$(tty)
37 | mvn clean deploy -DskipTests -Pdist -P-server
38 | ```
39 |
40 |
--------------------------------------------------------------------------------
/agent/agent-plugins/bithon-sdk/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-bithon-sdk
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 | ${project.groupId}
19 | agent-sdk
20 |
21 |
22 |
23 |
24 | ${project.artifactId}
25 |
26 |
--------------------------------------------------------------------------------
/docker/startup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ -f /opt/shared/conf/jvm.config ] ; then
4 | echo "Reading customer jvm configurations..."
5 | JAVA_OPTS="$(cat /opt/shared/conf/jvm.config | xargs) $JAVA_OPTS"
6 | fi
7 |
8 | JAVA_OPTS="-Dbithon.application.name=bithon-server $JAVA_OPTS"
9 |
10 | if [ "$INJECT_AGENT" = true ] ; then
11 | TEMP_SCRIPT=$(mktemp)
12 | if curl -sSL https://raw.githubusercontent.com/FrankChen021/bithon/refs/heads/master/docker/inject-agent.sh -o "$TEMP_SCRIPT"; then
13 | # shellcheck disable=SC1090
14 | if ! . "$TEMP_SCRIPT"; then
15 | echo "WARNING: Agent injection script failed to execute"
16 | fi
17 |
18 | rm -f "$TEMP_SCRIPT"
19 | else
20 | echo "Agent injection skipped: Failed to download agent injection script"
21 | fi
22 | else
23 | echo "Agent injection is NOT enabled. Injection skipped."
24 | fi
25 |
26 | # shellcheck disable=SC2086
27 | exec java ${JAVA_OPTS} -jar /opt/bithon-server-starter.jar ${APP_OPTS}
28 |
--------------------------------------------------------------------------------
/server/alerting/common/src/main/java/org/bithon/server/alerting/common/model/AlertSeverity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.common.model;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2020/12/8 10:25 上午
22 | */
23 | public enum AlertSeverity {
24 | Severe,
25 | Critical,
26 | }
27 |
--------------------------------------------------------------------------------
/server/alerting/notification/src/main/java/org/bithon/server/alerting/notification/image/ImageMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.notification.image;
18 |
19 | /**
20 | * @author Frank Chen
21 | * @date 19/3/22 8:22 PM
22 | */
23 | public enum ImageMode {
24 | URL,
25 | BASE64,
26 | NONE
27 | }
28 |
--------------------------------------------------------------------------------
/server/alerting/manager/src/main/java/org/bithon/server/alerting/manager/security/IUserProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.manager.security;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2023/12/9 15:32
22 | */
23 | public interface IUserProvider {
24 | User getCurrentUser();
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/IMetricValueProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 23/1/22 11:12 AM
22 | */
23 | public interface IMetricValueProvider {
24 | long get();
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-sentinel/src/main/java/org/bithon/agent/sentinel/expt/SentinelCommandException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.sentinel.expt;
18 |
19 | public class SentinelCommandException extends RuntimeException {
20 |
21 | public SentinelCommandException(String message) {
22 | super(message);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/alerting/ObjectAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.alerting;
18 |
19 | /**
20 | * @author Frank Chen
21 | * @date 20/3/22 4:36 PM
22 | */
23 | public enum ObjectAction {
24 | CREATE,
25 | DELETE,
26 | ENABLE,
27 | UPDATE,
28 | DISABLE
29 | }
30 |
--------------------------------------------------------------------------------
/component/component-commons/src/main/java/org/bithon/component/commons/expression/IEvaluationContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.commons.expression;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2023/4/7 20:24
22 | */
23 | public interface IEvaluationContext {
24 | Object get(String name);
25 | }
26 |
--------------------------------------------------------------------------------
/server/server-commons/src/main/java/org/bithon/server/commons/autocomplete/LexerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.commons.autocomplete;
18 |
19 | import org.antlr.v4.runtime.CharStream;
20 | import org.antlr.v4.runtime.Lexer;
21 |
22 | public interface LexerFactory {
23 |
24 | Lexer createLexer(CharStream input);
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/collector/IMetricCollectorBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.collector;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 3/10/21 11:18
22 | */
23 | public interface IMetricCollectorBase {
24 | boolean isEmpty();
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/IMetricValueUpdater.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/3/25 7:28 下午
22 | */
23 | public interface IMetricValueUpdater {
24 | long update(long value);
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/InvalidMetricValueException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2022/7/30 22:52
22 | */
23 | public class InvalidMetricValueException extends RuntimeException {
24 | }
25 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/tracing/sampler/ISampler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.tracing.sampler;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/2/9 10:33 下午
22 | */
23 | public interface ISampler {
24 | SamplingMode decideSamplingMode(Object request);
25 | }
26 |
--------------------------------------------------------------------------------
/server/server-commons/src/main/java/org/bithon/server/commons/autocomplete/ParserFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.commons.autocomplete;
18 |
19 | import org.antlr.v4.runtime.Parser;
20 | import org.antlr.v4.runtime.TokenStream;
21 |
22 | public interface ParserFactory {
23 |
24 | Parser createParser(TokenStream tokenStream);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/agent/agent-controller/src/main/java/org/bithon/agent/controller/IAgentControllerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.controller;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/1/16 4:40 下午
22 | */
23 | public interface IAgentControllerFactory {
24 | IAgentController createController(AgentControllerConfig config);
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-plugins/apache-zookeeper/src/main/java/org/bithon/agent/plugin/apache/zookeeper/IOMetrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.plugin.apache.zookeeper;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 15/1/25 10:30 pm
22 | */
23 | public class IOMetrics {
24 | public int bytesSent;
25 | public int bytesReceived;
26 | }
27 |
--------------------------------------------------------------------------------
/agent/agent-java-adaptor/agent-java-adaptor-java8/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 |
8 | org.bithon.agent
9 | agent-all
10 | 1.0-SNAPSHOT
11 | ../../pom.xml
12 |
13 |
14 | agent-java-adaptor-java8
15 | JDK 8 specific adaptations for the agent
16 |
17 |
18 |
19 | org.bithon.agent
20 | agent-core
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/schema/IMetricSpec.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.schema;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021-10-02
22 | */
23 | public interface IMetricSpec {
24 | String getType();
25 |
26 | String getName();
27 | }
28 |
--------------------------------------------------------------------------------
/component/component-brpc/src/main/java/org/bithon/component/brpc/IServiceRegistry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.brpc;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2022/12/9 21:21
22 | */
23 | @BrpcService(name = "brpc.IServiceRegistry")
24 | public interface IServiceRegistry {
25 | boolean contains(String service);
26 | }
27 |
--------------------------------------------------------------------------------
/component/component-commons/src/main/java/org/bithon/component/commons/expression/function/IFunctionProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.commons.expression.function;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2023/8/17 20:02
22 | */
23 | public interface IFunctionProvider {
24 | IFunction getFunction(String name);
25 | }
26 |
--------------------------------------------------------------------------------
/server/datasource/reader-jdbc/src/main/java/org/bithon/server/datasource/reader/jdbc/statement/ast/OrderByDirection.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.reader.jdbc.statement.ast;
18 |
19 |
20 | /**
21 | * @author frank.chen021@outlook.com
22 | * @date 22/4/25 11:05 pm
23 | */
24 | public enum OrderByDirection {
25 | ASC,
26 | DESC
27 | }
28 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/common/input/IInputSourceManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.common.input;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2024/3/29 18:27
22 | */
23 | public interface IInputSourceManager {
24 | void start(Class extends IInputSource> inputSourceClazz);
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-distribution/assemble-plugins.xml:
--------------------------------------------------------------------------------
1 |
2 | plugins
3 |
4 | jar
5 |
6 | false
7 |
8 |
9 |
10 | false
11 |
12 | org.bithon.agent:agent-plugin-*
13 |
14 | true
15 |
16 |
17 | META-INF/maven/
18 |
19 |
20 | **/*.class
21 |
22 |
23 | *.yml
24 |
25 |
26 | META-INF/bithon/*.meta
27 |
28 |
29 | /
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/schema/IDimensionSpec.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.schema;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021-10-02
22 | */
23 | public interface IDimensionSpec {
24 | String getName();
25 |
26 | String getType();
27 | }
28 |
--------------------------------------------------------------------------------
/server/service-discovery/client/src/main/java/org/bithon/server/discovery/client/IDiscoveryClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.discovery.client;
18 |
19 | import java.util.List;
20 |
21 | /**
22 | * @author frank.chen
23 | */
24 | public interface IDiscoveryClient {
25 |
26 | List getInstanceList(String serviceName);
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-core/src/main/java/org/bithon/agent/configuration/IConfigurationChangedListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.configuration;
18 |
19 | /**
20 | * @author frankchen
21 | * @date 2020-05-27 14:41:22
22 | */
23 | public interface IConfigurationChangedListener {
24 | /**
25 | * @param keys changes keys
26 | */
27 | void onChange();
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/grpc/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-grpc
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | io.grpc
20 | grpc-all
21 | 1.6.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/guice/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-guice
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | com.google.inject
19 | guice
20 | 4.1.0
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/netty4/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-netty4
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 | io.netty
19 | netty-common
20 | 4.1.118.Final
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/tracing/api/GetChildSpansRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.tracing.api;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2021/2/6 4:35 下午
24 | */
25 | @Data
26 | public class GetChildSpansRequest {
27 | private String parentSpanId;
28 | }
29 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/query/ResultFormat.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.query;
18 |
19 |
20 | /**
21 | * @author frank.chen021@outlook.com
22 | * @date 23/10/25 11:36 pm
23 | */
24 | public enum ResultFormat {
25 | /**
26 | * Object is output as an array
27 | */
28 | ValueArray,
29 | Object
30 | }
31 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jersey/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-jersey
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | com.sun.jersey
20 | jersey-bundle
21 | 1.19.4
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/openfeign/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-openfeign
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | io.github.openfeign
19 | feign-core
20 | 10.8
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/netty3/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-httpclient-netty3
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 | io.netty
19 | netty
20 | 3.10.6.Final
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/component/component-commons/src/main/java/org/bithon/component/commons/tracing/Components.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.commons.tracing;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2023/5/9 21:45
22 | */
23 | public class Components {
24 | public static final String HTTP_SERVER = "http-server";
25 | public static final String KAFKA = "kafka";
26 | }
27 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/meta/Metadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.meta;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2021/1/31 9:50 上午
24 | */
25 | @Data
26 | public class Metadata {
27 | private final String applicationName;
28 | private final String applicationType;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/agent/agent-plugins/mongodb/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-mongodb
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | org.mongodb
20 | mongo-java-driver
21 | 3.4.2
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/spring/webflux/src/main/java/org/bithon/agent/plugin/spring/webflux/context/TracingContextAttributes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.plugin.spring.webflux.context;
18 |
19 |
20 | /**
21 | * @author frank.chen021@outlook.com
22 | * @date 7/10/25 5:42 pm
23 | */
24 | public interface TracingContextAttributes {
25 | String TRACE_CONTEXT = "bithon.tracing.context";
26 | }
27 |
--------------------------------------------------------------------------------
/server/alerting/manager/src/main/java/org/bithon/server/alerting/manager/biz/CommandArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.manager.biz;
18 |
19 | import lombok.Builder;
20 | import lombok.Data;
21 |
22 | /**
23 | * @author Frank Chen
24 | * @date 19/3/22 11:42 AM
25 | */
26 | @Data
27 | @Builder
28 | public class CommandArgs {
29 | private boolean checkApplicationExist;
30 | }
31 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/generator/IAggregateInstanceSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.generator;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2025/2/13 20:31
22 | */
23 | @FunctionalInterface
24 | public interface IAggregateInstanceSupplier {
25 | T createInstance();
26 | }
27 |
--------------------------------------------------------------------------------
/agent/agent-plugins/glassfish/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-glassfish
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | org.glassfish.jersey.core
20 | jersey-server
21 | 2.34
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/logging/logback/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-logging-logback
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | ch.qos.logback
19 | logback-classic
20 | 1.2.13
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | server:
2 | shutdown: graceful
3 |
4 |
5 | spring:
6 | lifecycle:
7 | timeout-per-shutdown-phase: 120s # Default is 60s
8 | config:
9 | use-legacy-processing: true
10 |
11 | application:
12 | name: bithon-server
13 | cloud:
14 | #service-registry:
15 | # auto-registration:
16 | # NOTE: if it's set to FALSE, the service discovery does not work, which means the management API(/api/agent/command/xxx) also does not work
17 | # enabled: true
18 | nacos:
19 | config:
20 | enabled: false
21 | file-extension: yaml
22 | server-addr: nacos.server:80
23 | namespace: ffffffff-d350-4755-ab1a-28721fc79cfa
24 | refresh-enabled: true
25 | group: DEFAULT_GROUP
26 | discovery:
27 | enabled: false
28 | watch:
29 | enabled: false
30 | server-addr: nacos.server:80
31 |
32 | management:
33 | endpoints:
34 | web:
35 | exposure:
36 | include:
37 | - info
38 | - health
39 |
--------------------------------------------------------------------------------
/agent/agent-controller/src/main/java/org/bithon/agent/controller/cmd/IAgentCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.controller.cmd;
18 |
19 | /**
20 | * A tagged interface from which every command should inherit
21 | *
22 | * so that those commands could be found via SPI
23 | *
24 | * @author frank.chen021@outlook.com
25 | * @date 2021/7/1 6:29 下午
26 | */
27 | public interface IAgentCommand {
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-exporter-brpc/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | org.bithon.agent
7 | agent-all
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | 4.0.0
12 | agent-exporter-brpc
13 |
14 |
15 |
16 | org.bithon.component
17 | agent-rpc-brpc
18 | ${project.version}
19 |
20 |
21 | org.bithon.agent
22 | agent-observability
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/jetty/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-httpclient-jetty
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 | org.eclipse.jetty
19 | jetty-client
20 | 9.4.6.v20170531
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/logging/log4j2/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-logging-log4j2
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | org.apache.logging.log4j
19 | log4j-core
20 | 2.12.4
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/redis/jedis-2.x/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../../pom.xml
10 |
11 | agent-plugin-redis-jedis-2.x
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | redis.clients
20 | jedis
21 | 2.9.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/redis/jedis-3.x/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../../pom.xml
10 |
11 | agent-plugin-redis-jedis-3.x
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | redis.clients
20 | jedis
21 | 3.0.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/spring/bean/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-spring-bean
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | org.springframework
19 | spring-beans
20 | 4.3.12.RELEASE
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/component/component-commons/src/main/java/org/bithon/component/commons/expression/validation/IIdentifierProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.commons.expression.validation;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2024/1/20 14:06
22 | */
23 | public interface IIdentifierProvider {
24 | /**
25 | */
26 | IIdentifier getIdentifier(String identifier);
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/tracing/context/propagation/PropagationGetter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.tracing.context.propagation;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/2/5 9:41 下午
22 | */
23 | public interface PropagationGetter {
24 |
25 | String get(REQUEST_TYPE request, String key);
26 | }
27 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/tracing/sampler/SamplingMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.tracing.sampler;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/2/9 10:34 下午
22 | */
23 | public enum SamplingMode {
24 | FULL,
25 |
26 | /**
27 | * Not used now.
28 | */
29 | SIMPLIFIED,
30 |
31 | NONE
32 | }
33 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/common/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.bithon.agent
8 | agent-plugins
9 | 1.0-SNAPSHOT
10 | ../../pom.xml
11 |
12 | agent-plugin-jdbc-common
13 | 4.0.0
14 |
15 |
16 |
17 | org.bithon.agent
18 | agent-observability
19 |
20 |
21 |
22 | org.junit.jupiter
23 | junit-jupiter-api
24 | test
25 |
26 |
27 |
28 |
29 | ${project.artifactId}
30 |
31 |
32 |
--------------------------------------------------------------------------------
/agent/agent-plugins/spring/webmvc/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-spring-webmvc
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | org.springframework
19 | spring-webmvc
20 | 4.3.12.RELEASE
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/server/alerting/manager/src/main/java/org/bithon/server/alerting/manager/security/User.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.manager.security;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2023/12/9 15:32
25 | */
26 | @Data
27 | @AllArgsConstructor
28 | public class User {
29 | private String userName;
30 | }
31 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/tracing/context/propagation/PropagationSetter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.tracing.context.propagation;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/2/5 9:38 下午
22 | */
23 | public interface PropagationSetter {
24 | void put(REQUEST_TYPE request, String key, String value);
25 | }
26 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpserver/netty/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../../pom.xml
10 |
11 | agent-plugin-httpserver-netty
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | org.springframework.boot
20 | spring-boot
21 | 3.0.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/component/component-brpc/src/main/java/org/bithon/component/brpc/exception/ChannelException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.brpc.exception;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2022/8/10 21:33
22 | */
23 | public class ChannelException extends ServiceInvocationException {
24 | public ChannelException(CharSequence message) {
25 | super(message);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpserver/jetty/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../../pom.xml
10 |
11 | agent-plugin-httpserver-jetty
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | org.eclipse.jetty
20 | jetty-server
21 | 9.4.56.v20240826
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/spring/scheduling/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-spring-scheduling
11 |
12 |
13 |
14 | ${project.parent.groupId}
15 | agent-observability
16 |
17 |
18 | org.springframework
19 | spring-context
20 | 4.3.12.RELEASE
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/common/ApplicationType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.common;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2023/4/26 22:48
22 | */
23 | public class ApplicationType {
24 | public static final String JAVA = "JAVA";
25 | public static final String CPP = "CPP";
26 | public static final String UNKNOWN = "Unknown";
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/okhttp-3.2/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../../pom.xml
10 |
11 | agent-plugin-httpclient-okhttp-3.2
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | com.squareup.okhttp3
20 | okhttp
21 | 3.2.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/reactor/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../../pom.xml
10 |
11 | agent-plugin-httpclient-reactor
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | io.projectreactor.netty
20 | reactor-netty-http
21 | 1.0.11
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/redis/redisson/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | 4.0.0
11 | agent-plugin-redis-redisson
12 |
13 |
14 |
15 | ${project.parent.groupId}
16 | agent-observability
17 |
18 |
19 | org.redisson
20 | redisson
21 | 3.29.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
30 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/common/BatchConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.common;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2022/11/29 21:29
24 | */
25 | @Data
26 | public class BatchConfig {
27 | private int size = 2000;
28 |
29 | /**
30 | * in seconds
31 | */
32 | private int interval = 1;
33 | }
34 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/event/IEventReader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.event;
18 |
19 | import org.bithon.server.datasource.query.IDataSourceReader;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2021/2/14 4:18 下午
24 | */
25 | public interface IEventReader extends AutoCloseable, IDataSourceReader {
26 |
27 | default void close() {
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/event/IEventWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.event;
18 |
19 | import java.io.IOException;
20 | import java.util.List;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2021/2/14 4:17 下午
25 | */
26 | public interface IEventWriter extends AutoCloseable {
27 |
28 | void write(List eventMessage) throws IOException;
29 | }
30 |
--------------------------------------------------------------------------------
/agent/agent-instrumentation/src/main/java/org/bithon/agent/instrumentation/aop/debug/ProfilingTimestamp.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.instrumentation.aop.debug;
18 |
19 |
20 | /**
21 | * @author frank.chen021@outlook.com
22 | * @date 24/7/25 4:46 pm
23 | */
24 | public class ProfilingTimestamp {
25 | public long discoveryTimestamp;
26 | public long transformationTimestamp;
27 | public long completionTimestamp;
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/IMetricSet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/3/25 7:34 下午
22 | */
23 | public interface IMetricSet {
24 | /**
25 | * TODO: come up a way to automatically generate this method
26 | */
27 | IMetricValueProvider[] getMetrics();
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/tracing/id/ISpanIdGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.tracing.id;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/2/7 10:36 下午
22 | */
23 | public interface ISpanIdGenerator {
24 | /**
25 | * @return an id which can be represented in HEX with a length of 16
26 | */
27 | String newSpanId();
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/apache-httpcomponents4/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-httpclient-apache-httpcomponents4
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 | org.apache.httpcomponents
19 | httpclient
20 | 4.5.2
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/java-net-http/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-httpclient-java-net-http
11 |
12 |
14 |
15 | 11
16 | 11
17 |
18 |
19 |
20 |
21 | ${project.groupId}
22 | agent-observability
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
30 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/aggregator/NumberAggregator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.aggregator;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/4/6 9:21 下午
22 | */
23 | public abstract class NumberAggregator extends Number {
24 | public abstract void aggregate(long timestamp, Object value);
25 |
26 | public abstract Number getNumber();
27 | }
28 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/query/DataRowType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.query;
18 |
19 |
20 | /**
21 | * @author frank.chen021@outlook.com
22 | * @date 28/10/25 4:12 pm
23 | */
24 | public class DataRowType {
25 | public static final String DATA = "data";
26 | public static final String PROGRESS = "progress";
27 | public static final String META = "meta";
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/collector/IMetricCollector3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.collector;
18 |
19 | import java.util.List;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2022/11/30 22:21
24 | */
25 | public interface IMetricCollector3 extends IMetricCollectorBase {
26 |
27 | List collect(int interval, long timestamp);
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/domain/httpclient/HttpIOMetrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.domain.httpclient;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 6/11/21 7:55 pm
22 | */
23 | public class HttpIOMetrics {
24 | public long requestBytes = -1;
25 | public long responseBytes = -1;
26 | public long receivedTimeNs = 0;
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/Gauge.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | /**
20 | * Represents a cumulative value.
21 | * In contrast to Counter, its value will NOT be flushed after be accessed
22 | *
23 | * @author frank.chen021@outlook.com
24 | * @date 2021/2/23 9:19 下午
25 | */
26 | public interface Gauge extends IMetricValueProvider {
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/annotation/Last.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.annotation;
18 |
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2025/2/5 23:07
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | public @interface Last {
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/annotation/Max.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.annotation;
18 |
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2025/2/5 23:04
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | public @interface Max {
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/annotation/Min.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.annotation;
18 |
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2025/2/5 23:04
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | public @interface Min {
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/annotation/Sum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.annotation;
18 |
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2025/2/5 23:03
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | public @interface Sum {
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/annotation/First.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model.annotation;
18 |
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2025/2/5 23:07
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | public @interface First {
28 | }
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/apache-kafka-3.7/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-apache-kafka-3.7
11 |
12 |
13 |
14 | org.bithon.agent
15 | agent-plugin-apache-kafka
16 | ${project.version}
17 |
18 |
19 | org.apache.kafka
20 | kafka-clients
21 | 3.7.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/apache-kafka-3.9/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../pom.xml
9 |
10 | agent-plugin-apache-kafka-3.9
11 |
12 |
13 |
14 | org.bithon.agent
15 | agent-plugin-apache-kafka
16 | ${project.version}
17 |
18 |
19 | org.apache.kafka
20 | kafka-clients
21 | 3.9.0
22 | provided
23 |
24 |
25 |
26 |
27 | ${project.artifactId}
28 |
29 |
--------------------------------------------------------------------------------
/agent/agent-plugins/httpclient/apache-httpcomponents5/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.bithon.agent
6 | agent-plugins
7 | 1.0-SNAPSHOT
8 | ../../pom.xml
9 |
10 | agent-plugin-httpclient-apache-httpcomponents5
11 |
12 |
13 |
14 | ${project.groupId}
15 | agent-observability
16 |
17 |
18 | org.apache.httpcomponents.client5
19 | httpclient5
20 | 5.2.3
21 | provided
22 |
23 |
24 |
25 |
26 | ${project.artifactId}
27 |
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/mongodb-3.8/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | org.bithon.agent
7 | agent-plugins
8 | 1.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | agent-plugin-mongodb-3.8
12 | 4.0.0
13 |
14 |
15 |
16 | ${project.parent.groupId}
17 | agent-observability
18 |
19 |
20 | org.mongodb
21 | mongo-java-driver
22 | 3.8.0
23 | provided
24 |
25 |
26 |
27 |
28 | ${project.artifactId}
29 |
30 |
--------------------------------------------------------------------------------
/server/storage-jdbc-clickhouse/src/main/java/org/bithon/server/storage/jdbc/clickhouse/lb/IShardsUpdateListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.jdbc.clickhouse.lb;
18 |
19 | import java.util.Collection;
20 | import java.util.Map;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2024/1/14 12:33
25 | */
26 | public interface IShardsUpdateListener {
27 | void update(Map> shards);
28 | }
29 |
--------------------------------------------------------------------------------
/server/web-security/src/main/java/org/bithon/server/web/security/IHttpSecurityCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.security;
18 |
19 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2025/1/27 21:46
24 | */
25 | public interface IHttpSecurityCustomizer {
26 | void customize(HttpSecurity httpSecurity) throws Exception;
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql5/src/test/resources/init-mysql5.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Copyright 2020 bithon.org
3 | --
4 | -- Licensed under the Apache License, Version 2.0 (the "License");
5 | -- you may not use this file except in compliance with the License.
6 | -- You may obtain a copy of the License at
7 | --
8 | -- http://www.apache.org/licenses/LICENSE-2.0
9 | --
10 | -- Unless required by applicable law or agreed to in writing, software
11 | -- distributed under the License is distributed on an "AS IS" BASIS,
12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | -- See the License for the specific language governing permissions and
14 | -- limitations under the License.
15 | --
16 |
17 | -- MySQL 5.7 initialization script for TestContainers
18 | -- This script sets up a basic test database with sample data
19 |
20 | -- Create users table
21 | CREATE TABLE IF NOT EXISTS users (
22 | id INT AUTO_INCREMENT PRIMARY KEY,
23 | username VARCHAR(50) NOT NULL UNIQUE,
24 | email VARCHAR(100) NOT NULL,
25 | created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
26 | );
27 |
--------------------------------------------------------------------------------
/component/component-commons/src/main/java/org/bithon/component/commons/expression/validation/IIdentifier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.commons.expression.validation;
18 |
19 | import org.bithon.component.commons.expression.IDataType;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2024/1/20 14:06
24 | */
25 | public interface IIdentifier {
26 |
27 | String getName();
28 |
29 | IDataType getDataType();
30 | }
31 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-module-receiver.yml:
--------------------------------------------------------------------------------
1 | bithon:
2 | receivers:
3 | metrics:
4 | brpc:
5 | enabled: true
6 | port: 9898
7 | channel:
8 | low-water-mark: 128KiB
9 | high-water-mark: 256KiB
10 | http:
11 | enabled: true
12 | events:
13 | brpc:
14 | enabled: true
15 | port: 9896
16 | channel:
17 | low-water-mark: 128KiB
18 | high-water-mark: 256KiB
19 | traces:
20 | brpc:
21 | enabled: true
22 | port: 9895
23 | channel:
24 | low-water-mark: 128KiB
25 | high-water-mark: 256KiB
26 | http:
27 | enabled: true
28 | zipkin:
29 | enabled: true
30 | jaeger-udp:
31 | enabled: true
32 | port: 6831
33 | # threads is optional, See JaegerThriftUDPTraceReceiver to know the default value
34 | # threads: 8
35 | jaeger-http:
36 | enabled: true
37 | otlp-http:
38 | enabled: true
39 | otlp-grpc:
40 | enabled: true
41 | port: 4317
42 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/event/Event.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.event;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 22/12/21 11:26 AM
24 | */
25 | @Data
26 | public class Event {
27 | private long timestamp;
28 | private String application;
29 | private String instance;
30 | private String type;
31 | private String args;
32 | }
33 |
--------------------------------------------------------------------------------
/agent/agent-instrumentation/src/main/java/org/bithon/agent/instrumentation/aop/interceptor/descriptor/MethodType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.instrumentation.aop.interceptor.descriptor;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2023/3/19 15:33
22 | */
23 | public enum MethodType {
24 | CONSTRUCTOR,
25 |
26 | /**
27 | * for those which are not constructors
28 | */
29 | NON_CONSTRUCTOR,
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/server/alerting/manager/src/main/java/org/bithon/server/alerting/manager/api/model/UpdateRuleRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.manager.api.model;
18 |
19 | import lombok.Getter;
20 | import lombok.Setter;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 27/11/24 11:14 am
25 | */
26 | @Getter
27 | @Setter
28 | public class UpdateRuleRequest extends CreateRuleRequest {
29 | private boolean enabled = true;
30 | }
31 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/aggregator/LongSumAggregator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.aggregator;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/4/6 9:28 下午
22 | */
23 | public class LongSumAggregator extends AbstractLongAggregator {
24 |
25 | @Override
26 | protected void aggregate(long timestamp, long value) {
27 | this.value += value;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/server/alerting/common/src/main/java/org/bithon/server/alerting/common/model/IAlertExpressionVisitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.common.model;
18 |
19 | import org.bithon.component.commons.expression.IExpressionVisitor;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2024/1/9 09:24
24 | */
25 | public interface IAlertExpressionVisitor extends IExpressionVisitor {
26 | T visit(AlertExpression expression);
27 | }
28 |
--------------------------------------------------------------------------------
/server/alerting/evaluator/src/main/java/org/bithon/server/alerting/evaluator/evaluator/pipeline/IPipelineStep.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.evaluator.evaluator.pipeline;
18 |
19 |
20 | import org.bithon.server.alerting.common.evaluator.EvaluationContext;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 17/3/25 10:59 pm
25 | */
26 | public interface IPipelineStep {
27 | void evaluate(EvaluationContext context);
28 | }
29 |
--------------------------------------------------------------------------------
/server/alerting/manager/src/main/java/org/bithon/server/alerting/manager/api/model/GetRuleFoldersRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.manager.api.model;
18 |
19 |
20 | import lombok.Data;
21 |
22 | import javax.annotation.Nullable;
23 |
24 | /**
25 | * @author frank.chen021@outlook.com
26 | * @date 29/4/25 12:16 am
27 | */
28 | @Data
29 | public class GetRuleFoldersRequest {
30 | @Nullable
31 | private String parentFolder;
32 | }
33 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/aggregator/DoubleSumAggregator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.aggregator;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/4/6 9:28 下午
22 | */
23 | public class DoubleSumAggregator extends AbstractDoubleAggregator {
24 | @Override
25 | protected void aggregate(long timestamp, double value) {
26 | this.value += value;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/alerting/pojo/ListResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.alerting.pojo;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 |
22 | import java.util.List;
23 |
24 | /**
25 | * @author frank.chen021@outlook.com
26 | * @date 2021/1/11
27 | */
28 | @Data
29 | @AllArgsConstructor
30 | public class ListResult {
31 | private int rows;
32 | private List data;
33 | }
34 |
--------------------------------------------------------------------------------
/agent/agent-plugins/spring/webflux/README.md:
--------------------------------------------------------------------------------
1 |
2 | #
3 | The Spring WebFlux is used in Spring Gateway, which serves as http server and http client.
4 | The http client used in Spring Gateway is based on reactor-netty-httpclient,
5 | which is instrumented by httpclient-reactor plugin.
6 |
7 | So, to make the tracing and metrics of Spring Gateway works,
8 | we also need to make sure the httpclient-reactor plugin is enabled.
9 |
10 | ## Trace Propagation Path
11 |
12 | ```mermaid
13 | graph
14 | ReactorHttpHandlerAdapter(HttpServerOperations, resp)
15 | ---> filters ( AbstractServerHttpRequest(HttpServerOperations) )
16 | ---> NettyRoutingFilter
17 | ---> HttpClientFinializer#send
18 | ---> HttpClientFinializer#responseConnection
19 | ---> Flux#timeout
20 | ```
21 |
22 | 1. TraceContext is created on `ReactorHttpHandlerAdapter`
23 | 2. TraceContext is held in thread local for following interceptors to use
24 | 3. methods of `HttpClientFinializer` is called in `NettyRoutingFilter`
25 | 4. Trace span for `HttpClientFinializer` is created in `HttpClientFinializer#send` and is released in `HttpClientFinializer#responseConnection`
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/common/handler/IMessageHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.common.handler;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/1/10 4:40 下午
22 | */
23 | public interface IMessageHandler {
24 |
25 | /**
26 | * get type of messages that are handled by this handler
27 | */
28 | String getType();
29 |
30 | void submit(MESSAGE message);
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/IMetricAggregatePredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | import org.bithon.agent.observability.metric.model.schema.Dimensions;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2025/2/5 20:22
24 | */
25 | public interface IMetricAggregatePredicate {
26 | boolean isAggregatable(Dimensions dimensions, T metric);
27 | }
28 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/query/pipeline/IQueryStep.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.query.pipeline;
18 |
19 |
20 | import java.util.concurrent.CompletableFuture;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 4/4/25 3:47 pm
25 | */
26 | public interface IQueryStep {
27 |
28 | boolean isScalar();
29 |
30 | CompletableFuture execute() throws Exception;
31 | }
32 |
--------------------------------------------------------------------------------
/server/metric-expression/src/main/java/org/bithon/server/metric/expression/ast/IMetricExpressionVisitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.metric.expression.ast;
18 |
19 |
20 | import org.bithon.component.commons.expression.IExpressionVisitor;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 4/4/25 3:55 pm
25 | */
26 | public interface IMetricExpressionVisitor extends IExpressionVisitor {
27 | T visit(MetricExpression expression);
28 | }
29 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/tracing/api/ValidateFilterExpressionResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.tracing.api;
18 |
19 |
20 | import lombok.Builder;
21 | import lombok.Data;
22 |
23 | /**
24 | * @author frank.chen021@outlook.com
25 | * @date 10/7/25 5:29 pm
26 | */
27 | @Data
28 | @Builder
29 | public class ValidateFilterExpressionResponse {
30 | private boolean valid;
31 | private String error;
32 | }
33 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql8/src/test/resources/init-mysql8.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Copyright 2020 bithon.org
3 | --
4 | -- Licensed under the Apache License, Version 2.0 (the "License");
5 | -- you may not use this file except in compliance with the License.
6 | -- You may obtain a copy of the License at
7 | --
8 | -- http://www.apache.org/licenses/LICENSE-2.0
9 | --
10 | -- Unless required by applicable law or agreed to in writing, software
11 | -- distributed under the License is distributed on an "AS IS" BASIS,
12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | -- See the License for the specific language governing permissions and
14 | -- limitations under the License.
15 | --
16 |
17 | -- MySQL 8.0 initialization script for TestContainers (MySQL 8.x driver)
18 | -- This script sets up test database with advanced MySQL 8 features
19 |
20 | -- Create users table
21 | CREATE TABLE IF NOT EXISTS users (
22 | id INT AUTO_INCREMENT PRIMARY KEY,
23 | username VARCHAR(50) NOT NULL UNIQUE,
24 | email VARCHAR(100) NOT NULL,
25 | created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
26 | );
27 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/common/transformer/TransformResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.common.transformer;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 14/3/24 13:52 PM
22 | */
23 | public enum TransformResult {
24 | /**
25 | * Continue the transformation pipeline
26 | */
27 | CONTINUE,
28 |
29 | /**
30 | * Drop current data being processed
31 | */
32 | DROP
33 | }
34 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/datasource/api/DisplayableText.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.datasource.api;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Getter;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2021/3/6 1:35 下午
25 | */
26 | @Getter
27 | @AllArgsConstructor
28 | public class DisplayableText {
29 | private final String value;
30 | private final String text;
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/utils/filter/StringAnyMatcher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.utils.filter;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2021/8/11 17:38
22 | */
23 | public class StringAnyMatcher implements IMatcher {
24 | public static final String TYPE = "any";
25 |
26 | @Override
27 | public boolean matches(Object input) {
28 | return true;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/server/agent-controller/src/main/java/org/bithon/server/agent/controller/rbac/Role.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.agent.controller.rbac;
18 |
19 | import lombok.Data;
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 |
24 | /**
25 | * @author frank.chen021@outlook.com
26 | * @date 22/1/25 5:29 pm
27 | */
28 | @Data
29 | public class Role {
30 | private final String name;
31 | private final List permissions = new ArrayList<>();
32 | }
33 |
--------------------------------------------------------------------------------
/server/storage-jdbc-clickhouse/src/main/java/org/bithon/server/storage/jdbc/clickhouse/lb/ILoadBalancer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.jdbc.clickhouse.lb;
18 |
19 | import java.util.Collection;
20 |
21 | /**
22 | * @author Frank Chen
23 | * @date 15/11/23 3:41 pm
24 | */
25 | public interface ILoadBalancer {
26 | LoadBalancerStrategy getStrategyName();
27 |
28 | int nextShard(int writtenRows);
29 |
30 | void update(Collection shards);
31 | }
32 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/datasource/api/UpdateTTLRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.datasource.api;
18 |
19 | import jakarta.validation.constraints.NotNull;
20 | import lombok.Data;
21 | import org.bithon.server.commons.time.Period;
22 |
23 | /**
24 | * @author frank.chen021@outlook.com
25 | * @date 20201-09-30
26 | */
27 | @Data
28 | public class UpdateTTLRequest {
29 | @NotNull
30 | private Period ttl;
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-core/src/main/java/org/bithon/agent/starter/IAgentShutdownListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 | package org.bithon.agent.starter;
19 |
20 | /**
21 | * @author frank.chen021@outlook.com
22 | * @date 2023/3/17 00:39
23 | */
24 | public interface IAgentShutdownListener {
25 | /**
26 | * The lower the value, the lower priority that the listener will be invoked
27 | */
28 | default int getOrder() {
29 | return 0;
30 | }
31 |
32 | void shutdown();
33 | }
34 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/exporter/IMessageExporter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.exporter;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2020/10/27 2:17 下午
22 | */
23 | public interface IMessageExporter extends AutoCloseable {
24 |
25 | /**
26 | * In the current design, this method is called in one thread only, so it's thread-safe.
27 | */
28 | void export(Object message);
29 | }
30 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/h2/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.bithon.agent
8 | agent-plugins
9 | 1.0-SNAPSHOT
10 | ../../pom.xml
11 |
12 | agent-plugin-jdbc-h2
13 | 4.0.0
14 |
15 |
16 |
17 |
18 | org.bithon.agent
19 | agent-plugin-jdbc-common
20 | ${project.version}
21 |
22 |
23 |
24 | com.h2database
25 | h2
26 | 2.2.224
27 | provided
28 |
29 |
30 |
31 |
32 | ${project.artifactId}
33 |
34 |
35 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/mysql6/src/test/resources/init-mysql6.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Copyright 2020 bithon.org
3 | --
4 | -- Licensed under the Apache License, Version 2.0 (the "License");
5 | -- you may not use this file except in compliance with the License.
6 | -- You may obtain a copy of the License at
7 | --
8 | -- http://www.apache.org/licenses/LICENSE-2.0
9 | --
10 | -- Unless required by applicable law or agreed to in writing, software
11 | -- distributed under the License is distributed on an "AS IS" BASIS,
12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | -- See the License for the specific language governing permissions and
14 | -- limitations under the License.
15 | --
16 |
17 | -- MySQL 8.0 initialization script for TestContainers (MySQL 6.x driver)
18 | -- This script sets up test database with JSON support and stored procedures
19 |
20 | -- Create users table
21 | CREATE TABLE IF NOT EXISTS users (
22 | id INT AUTO_INCREMENT PRIMARY KEY,
23 | username VARCHAR(50) NOT NULL UNIQUE,
24 | email VARCHAR(100) NOT NULL,
25 | created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
26 | );
27 |
--------------------------------------------------------------------------------
/server/alerting/common/src/main/java/org/bithon/server/alerting/common/model/IAlertInDepthExpressionVisitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.common.model;
18 |
19 | import org.bithon.component.commons.expression.IExpressionInDepthVisitor;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2024/1/8 23:07
24 | */
25 | public interface IAlertInDepthExpressionVisitor extends IExpressionInDepthVisitor {
26 | void visit(AlertExpression expression);
27 | }
28 |
--------------------------------------------------------------------------------
/server/alerting/manager/src/main/java/org/bithon/server/alerting/manager/api/model/GetRuleFoldersResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.alerting.manager.api.model;
18 |
19 |
20 | import lombok.Builder;
21 | import lombok.Data;
22 |
23 | import java.util.List;
24 |
25 | /**
26 | * @author frank.chen021@outlook.com
27 | * @date 29/4/25 12:23 am
28 | */
29 | @Data
30 | @Builder
31 | public class GetRuleFoldersResponse {
32 |
33 | private List folders;
34 | }
35 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/meta/api/GetApplicationsRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.meta.api;
18 |
19 | import lombok.Data;
20 |
21 | import javax.annotation.Nullable;
22 |
23 | /**
24 | * @author frank.chen021@outlook.com
25 | * @date 2022/4/14 3:41 下午
26 | */
27 | @Data
28 | public class GetApplicationsRequest {
29 | @Nullable
30 | private String appType;
31 |
32 | private long since = 3600_000 * 24;
33 | }
34 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/tracing/api/ValidateFilterExpressionRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.tracing.api;
18 |
19 |
20 | import jakarta.validation.constraints.NotEmpty;
21 | import lombok.Data;
22 |
23 | /**
24 | * @author frank.chen021@outlook.com
25 | * @date 10/7/25 5:26 pm
26 | */
27 | @Data
28 | public class ValidateFilterExpressionRequest {
29 | @NotEmpty
30 | private String[] filterExpressionList;
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-plugins/redis/lettuce-5.x/src/main/java/org/bithon/agent/plugin/redis/lettuce/interceptor/AsyncCommand$Cancel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.plugin.redis.lettuce.interceptor;
18 |
19 | /**
20 | * {@link io.lettuce.core.protocol.AsyncCommand#cancel(boolean)}
21 | *
22 | * @author frankchen
23 | */
24 | public class AsyncCommand$Cancel extends AsyncCommandComplete {
25 |
26 | @Override
27 | protected boolean isFailure() {
28 | return true;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/component/component-brpc/src/main/java/org/bithon/component/brpc/endpoint/SingleEndPointProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.component.brpc.endpoint;
18 |
19 | public class SingleEndPointProvider implements IEndPointProvider {
20 | private final EndPoint ep;
21 |
22 | public SingleEndPointProvider(String host, int port) {
23 | ep = new EndPoint(host, port);
24 | }
25 |
26 | @Override
27 | public EndPoint getEndpoint() {
28 | return ep;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/sentinel/DeleteRuleRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.sentinel;
18 |
19 | import jakarta.validation.constraints.NotEmpty;
20 | import lombok.Data;
21 |
22 | /**
23 | * @author frank.chen021@outlook.com
24 | * @date 2021/7/6 6:48 下午
25 | */
26 | @Data
27 | public class DeleteRuleRequest {
28 | @NotEmpty
29 | private String appName;
30 |
31 | @NotEmpty
32 | private String ruleId;
33 | }
34 |
--------------------------------------------------------------------------------
/agent/agent-plugins/grpc/src/main/java/org/bithon/agent/plugin/grpc/utils/MessageUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.plugin.grpc.utils;
18 |
19 | import com.google.protobuf.MessageLite;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2024/9/8 22:05
24 | */
25 | public class MessageUtils {
26 | public static int getMessageSize(Object message) {
27 | return message instanceof MessageLite ? ((MessageLite) message).getSerializedSize() : -1;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/server/datasource/common/src/main/java/org/bithon/server/datasource/query/ColumnMetadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.datasource.query;
18 |
19 |
20 | import lombok.AllArgsConstructor;
21 | import lombok.Builder;
22 | import lombok.Data;
23 |
24 | /**
25 | * @author frank.chen021@outlook.com
26 | * @date 20/10/25 11:06 pm
27 | */
28 | @Data
29 | @Builder
30 | @AllArgsConstructor
31 | public class ColumnMetadata {
32 | private String name;
33 | private String dataType;
34 | }
35 |
--------------------------------------------------------------------------------
/server/storage/src/main/java/org/bithon/server/storage/metrics/IMetricWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.metrics;
18 |
19 | import org.bithon.server.datasource.input.IInputRow;
20 |
21 | import java.io.IOException;
22 | import java.util.List;
23 |
24 | /**
25 | * @author frank.chen021@outlook.com
26 | * @date 2020/12/2 6:36 下午
27 | */
28 | public interface IMetricWriter extends AutoCloseable {
29 |
30 | void write(List inputRowList) throws IOException;
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/metric/model/IMetricAccessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.metric.model;
18 |
19 | /**
20 | * @author frank.chen021@outlook.com
21 | * @date 2025/2/13 21:53
22 | */
23 | public interface IMetricAccessor {
24 | long getMetricValue(int i);
25 |
26 | int getMetricCount();
27 |
28 | default long getMetricValue(String name) {
29 | throw new UnsupportedOperationException();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-plugins/grpc/src/main/java/org/bithon/agent/plugin/grpc/ShadedGrpcList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.plugin.grpc;
18 |
19 | import org.bithon.agent.configuration.ConfigurationProperties;
20 |
21 | import java.util.ArrayList;
22 |
23 | /**
24 | * a package list that how io.grpc packages are mapped to
25 | * @author frankchen
26 | */
27 | @ConfigurationProperties(path = "agent.plugin.grpc.shaded", dynamic = false)
28 | public class ShadedGrpcList extends ArrayList {
29 | }
30 |
--------------------------------------------------------------------------------
/agent/agent-plugins/jdbc/postgresql/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.bithon.agent
8 | agent-plugins
9 | 1.0-SNAPSHOT
10 | ../../pom.xml
11 |
12 | agent-plugin-jdbc-postgresql
13 | 4.0.0
14 |
15 |
16 |
17 | org.bithon.agent
18 | agent-plugin-jdbc-common
19 | ${project.version}
20 |
21 |
22 |
23 | org.postgresql
24 | postgresql
25 | 42.4.4
26 | provided
27 |
28 |
29 |
30 |
31 | ${project.artifactId}
32 |
33 |
34 |
--------------------------------------------------------------------------------
/server/server-starter/src/main/resources/application-app-collector.yml:
--------------------------------------------------------------------------------
1 | #
2 | # This file demonstrates how to deploy the collector module independently.
3 | # The collector module collects all data and forwards them into different Kafka topics.
4 | #
5 | spring:
6 | config:
7 | import:
8 | # Note: the controller module is optional to be deployed with the collector module.
9 | - classpath:application-module-controller.yml
10 | - classpath:application-module-receiver.yml
11 | - classpath:application-module-pipeline-to-kafka.yml
12 |
13 | bithon:
14 | storage:
15 | meta:
16 | enabled: true
17 | provider: h2-local
18 | ttl:
19 | enabled: true
20 | ttl: PT5M
21 | cleanPeriod: PT1M
22 | # If the controller module is deployed, the following 'setting' is required
23 | setting:
24 | enabled: true
25 | provider: h2-local
26 |
27 | providers:
28 | h2-local:
29 | type: h2
30 | url: jdbc:h2:mem:bithon_meta;DB_CLOSE_DELAY=-1;MODE=mysql;
31 | username: sa
32 |
33 | server:
34 | port: 19897
35 | compression:
36 | enabled: true
37 | min-response-size: 4096
--------------------------------------------------------------------------------
/server/storage-jdbc/src/main/java/org/bithon/server/storage/jdbc/common/IOnceTableWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.storage.jdbc.common;
18 |
19 | import org.jooq.ConnectionRunnable;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2024/1/15 22:47
24 | */
25 | public interface IOnceTableWriter extends ConnectionRunnable {
26 | String getTableName();
27 |
28 | /**
29 | * Get the size of the inserted batch
30 | */
31 | int getInsertRows();
32 | }
33 |
--------------------------------------------------------------------------------
/server/web-service/src/main/java/org/bithon/server/web/service/meta/api/GetMetadataListRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.web.service.meta.api;
18 |
19 | import jakarta.validation.constraints.NotNull;
20 | import lombok.Data;
21 | import org.bithon.server.storage.meta.MetadataType;
22 |
23 | /**
24 | * @author frank.chen021@outlook.com
25 | * @date 2021/1/31 3:41 下午
26 | */
27 | @Data
28 | public class GetMetadataListRequest {
29 | @NotNull
30 | private MetadataType type;
31 | }
32 |
--------------------------------------------------------------------------------
/server/pipeline/src/main/java/org/bithon/server/pipeline/metrics/exporter/IMetricMessageHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.server.pipeline.metrics.exporter;
18 |
19 | import org.bithon.server.datasource.input.IInputRow;
20 |
21 | import java.util.List;
22 |
23 | /**
24 | * @author frank.chen021@outlook.com
25 | * @date 2024/7/14 18:20
26 | */
27 | public interface IMetricMessageHandler extends AutoCloseable {
28 | void process(List metricMessages);
29 |
30 | void close();
31 | }
32 |
--------------------------------------------------------------------------------
/agent/agent-observability/src/main/java/org/bithon/agent/observability/tracing/context/propagation/ITraceContextInjector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.observability.tracing.context.propagation;
18 |
19 | import org.bithon.agent.observability.tracing.context.ITraceContext;
20 |
21 | /**
22 | * @author frank.chen021@outlook.com
23 | * @date 2021/2/5 9:39 下午
24 | */
25 | public interface ITraceContextInjector {
26 | void inject(ITraceContext context, R request, PropagationSetter setter);
27 | }
28 |
--------------------------------------------------------------------------------
/agent/agent-plugins/redis/lettuce-5.x/src/main/java/org/bithon/agent/plugin/redis/lettuce/interceptor/AsyncCommand$CompleteResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 bithon.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.bithon.agent.plugin.redis.lettuce.interceptor;
18 |
19 | /**
20 | * {@link io.lettuce.core.protocol.AsyncCommand#completeResult()}
21 | *
22 | * @author frankchen
23 | */
24 | public class AsyncCommand$CompleteResult extends AsyncCommandComplete {
25 |
26 | @Override
27 | protected boolean isFailure() {
28 | return false;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------