31 Ekim 2022 Pazartesi

git restore seçeneği

Giriş
Git 2.23 ile geliyor. git checkout iki tane işi birden yapıyor
1. Switch branches veya
2. Restore working tree files

Bu işleri iki farklı seçeneği böldüler
Örnek
Şöyle yaparız
git restore README.md
# same as 'git checkout -- README.md'
git restore --staged README.md
# same as 'git reset HEAD README.md'

git switch seçeneği

Giriş
Git 2.23 ile geliyor. git checkout iki tane işi birden yapıyor
1. Switch branches veya
2. Restore working tree files

Bu işleri iki farklı seçeneği böldüler

Örnek
Şöyle yaparız
git switch develop
# same as 'git checkout develop'

git switch -c new-branch
# same as 'git checkout -b new-branch'

OpenTelemetry Nedir?

OpenTelemetry Nedir?
Açıklaması şöyle. Yani Open Tracing ve OpenCensus projelerinin birleşmesinden ortaya çıkmıştır.
The OpenTelemetry website states that:

"OpenTelemetry is a collection of tools, APIs, and SDKs. Use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software's performance and behavior."

OpenTelemetry was created by merging the popular OpenTracing and OpenCensus projects. It is a standard that integrates with many open source and commercial products written in many programming languages. Implementations of OpenTelemetry are in varying stages of maturity.

At its core, OpenTelemetry contains the Collector, a vendor-agnostic way to receive, process, and export telemetry data.
OpenTelemetry Nasıl Çalışır
- Uygulama OpenTelemetry SDK ile instrument edilir.
- Artık loglar bir OpenTelemetry Collector'a gönderilir. 
- Collector üzerinde gerekli filtrelemeler yapılır ve 
- Collector logları bir backend'e gönderir.
Şeklen şöyle


instrumentation-annotations
Maven
Şu satırı dahil ederiz
<dependency>
  <groupId>io.opentelemetry.instrumentation</groupId>
  <artifactId>opentelemetry-instrumentation-annotations</artifactId>
  <version>1.17.0-alpha</version>
</dependency>
Örnek
Şöyle yaparız
import io.opentelemetry.instrumentation.annotations.SpanAttribute
import io.opentelemetry.instrumentation.annotations.WithSpan

@WithSpan("ProductHandler.fetch")
suspend fun fetch(@SpanAttribute("id") id: Long): Result<Product> {
  ...
}
OpenTelemetry Backend Nedir?
OpenTelemetry Backend yazısına taşıdım

OpenTelemetry Operator
Şöyle yaparız
kubectl apply \
-f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml



30 Ekim 2022 Pazar

Jenkins Credentials

Örnek - token
Açıklaması şöyle
Go to Manage Jenkins-> Manage Credentials-> Choose Secret Text type credential and paste the token which is generated in Jfrog Platform and add ID and Description as artifactory-access-token

Örnek - Kullanıcı İsmi ve Şifre
Açıklaması şöyle
To publish an image to your repository you will need to add the credentials of your Docker Hub account to Jenkins, do so by navigating to Manage Jenkins > Manage Credentials > System > Global Credentials > Add Credentials. Add your credentials and give them an id that you will use later.
Şeklen şöyle




29 Ekim 2022 Cumartesi

Jenkins Global Tool Configuration

Giriş
Menü şöyle
Manage Jenkins > Global Tool Configuration
Node.Js ve Docker Kurulum
Açıklaması şöyle
Go back to the dashboard and then to Manage Jenkins > Global Tool Configuration. For both Docker and NodeJS, give it a name and select Install automatically, then select install from nodejs.org and from docker.com. Click Save/Apply.
Node.js şeklen şöyle

Docker şeklen şöyle


27 Ekim 2022 Perşembe

sqlline komutu

Giriş
MySQL için mysqlsh kullanılabilir

-d seçeneği
Kullanılacak JDBC sürücüsünü belirtir.
Örnek
Şöyle yaparız
$ ./sqlline -d com.hazelcast.jdbc.Driver -u jdbc:hazelcast://localhost:5701