Opentelemetry Collector
· ☕ 1 åˆ†é’Ÿ
配置 参考:https://opentelemetry.io/docs/collector/configuration Receivers 参考: https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/README.md https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/README.md 1 2 3 4 5 6

Bytebuddy
· ☕ 0 åˆ†é’Ÿ

Java 内置 Class Loader
· ☕ 1 åˆ†é’Ÿ
内置 Classloader Bootstrap Class Loader Java classes are loaded by an instance of java.lang.ClassLoader. However, class loaders are classes themselves. Hence, the question is, who loads the java.lang.ClassLoader itself*?* This is where the bootstrap or primordial class loader comes into the picture. It’s mainly responsible for loading JDK internal classes, typically rt.jar and other core libraries located in $JAVA_HOME/jre/lib directory. Additionally, Bootstrap class loader serves as a parent of

Opentelemetry Java Agent 浅度解构
· ☕ 2 åˆ†é’Ÿ
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/javaagent-jar-components.md Conf Creating spans around methods with otel.instrumentation.methods.include Ref: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/manual-instrumentation.md Format is "java -Dotel.instrumentation.methods.include=my.package.MyClass1[method1,method2];my.package.MyClass2[method3]" Classloader [arthas@16908]$ classloader -t +-BootstrapClassLoader +-io.opentelemetry.javaagent.bootstrap.AgentClassLoader@379619aa +-sun.misc.Launcher$ExtClassLoader@41fa769c +-com.taobao.arthas.agent.ArthasClassloader@3697b340 +-sun.misc.Launcher$AppClassLoader@18b4aac2 +-java.net.URLClassLoader@71b2d611 +-java.net.URLClassLoader@69cd1085 | +-WebAppClassLoader=266661735@fe4ef67 | | +-com.mycom.sig.foundation.servicediscovery.ExtendedClassLoader@573f7aae | +-WebAppClassLoader=Server Initiated@1ccb04b3 | | +-com.mycom.sig.foundation.servicediscovery.ExtendedClassLoader@4b3b9a06 | | +-jnr.ffi.provider.jffi.AsmClassLoader@73cb9ccb | | +-jnr.ffi.provider.jffi.AsmClassLoader@7c380e94 | | +-jnr.ffi.provider.jffi.AsmClassLoader@69ec5d1f | +-WebAppClassLoader=OAuth Server@10d98940 | | +-com.mycom.ece.common.svcfinder.ExtendedClassLoader@3528968e | | +-com.mycom.sig.foundation.servicediscovery.ExtendedClassLoader@2919aff3 | | +-jnr.ffi.provider.jffi.AsmClassLoader@1b0e6bac | | +-jnr.ffi.provider.jffi.AsmClassLoader@2f12d8d1 | | +-jnr.ffi.provider.jffi.AsmClassLoader@73123f21 | +-WebAppClassLoader=1133988396@43974a2c | +-com.mycom.sig.foundation.servicediscovery.ExtendedClassLoader@39d87c5f +-java.net.URLClassLoader@1b4c457c +-java.net.URLClassLoader@3a477cf5 Affect(row-cnt:24)

K8s Custom Resources(CR)
· ☕ 2 åˆ†é’Ÿ
Custom Resource 的入口 请求是这样分发到 api 扩展点的: 例如我们有 (Custom Resource)CR 1 2 3 4 5 6 7 8 apiVersion:cnat.programming-kubernetes.info/v1alpha1kind:Atmetadata:name:example-atspec:schedule:"2019-07-03T02:00:00Z"status:phase:"pending" 相应的 CustomResourceDefinition (CRD) 会是这样: 1 2 3 4 5 6 7 8 9

K8s API 核心对象 —— client-go
· ☕ 3 åˆ†é’Ÿ
API 入口 Client Sets 接收变更通知和缓存(Informers and Caching) Client Sets可以 watch 变更,但一般我们用更高级的 Informers,因为它有缓存

Helm base
· ☕ 1 åˆ†é’Ÿ
Concept umbrella chart you can also create a chart with dependencies to other charts (a.k.a. umbrella chart) which are completely external using the requirements.yaml file. versioning Simple 1-1 versioning Chart versus application versioning 参考 https://codefresh.io/docs/docs/new-helm/helm-best-practices/

Kubernetes extends concept
· ☕ 3 åˆ†é’Ÿ
前言 最近由于工作需要,重新系统回顾 Kubernetes 的编程。发现《Programming Kubernetes》这书写得比较系统。于是边学,边记录一些重点。 Controller

helm GO SDK
· ☕ 1 åˆ†é’Ÿ
参考 https://helm.sh/docs/topics/advanced/#go-sdk https://pkg.go.dev/helm.sh/helm/v3

Kubernetes 自动扩缩容
· ☕ 1 åˆ†é’Ÿ
本文状态:草稿 配置例子 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 apiVersion:autoscaling/v2beta2kind:HorizontalPodAutoscalermetadata:name:php-apachespec:scaleTargetRef:apiVersion:apps/v1kind:Deploymentname:php-apacheminReplicas:1maxReplicas:10metrics:- type:Resourceresource:name:cputarget:type:UtilizationaverageUtilization:50 算法 desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )] currentMetricValue 为相关 pod 的 metric 平均数。 If multiple metrics are specified in a HorizontalPodAutoscaler, this calculation is done for each metric, and then

内核同步原语
· ☕ 5 åˆ†é’Ÿ
什么是同步原语 共享内存,多进程/线程的运行期设计模式已成主流的今天,你有好奇一下,进程/线程间的怎么同步的吗?大部分人知道,我们用的开发语言