Skip to content

Instantly share code, notes, and snippets.

Masroor Hasan masroorhasan

View GitHub Profile
View create-pod.cs
client.CoreApi.CreateNamespacedPod(
"default",
new V1Pod(
Metadata: new V1ObjectMeta(Name: "iis"),
Spec: new V1PodSpec(
Containers: new List<V1Container>
{
new V1Container(
Image: "microsoft/iis:nanoserver",
Name: "iis",
View get-pod.cs
V1PodList podList = client.CoreApi.ListNamespacedPod("default");
foreach (V1Pod pod in podList.Items)
Console.WriteLine($"Pod={pod.Metadata.Name}");
View jaeger-es-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: jaeger-configuration
namespace: monitoring
labels:
app: jaeger
jaeger-infra: configuration
data:
span-storage-type: elasticsearch
View elasticsearch-svc.yaml
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: elasticsearch
namespace: monitoring
labels:
app: elasticsearch
jaeger-infra: elasticsearch-statefulset
spec:
serviceName: elasticsearch
View jaeger-query.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jaeger-query
namespace: monitoring
labels:
app: jaeger
jaeger-infra: query-deployment
spec:
replicas: 1
View jaeger-collector.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jaeger-collector
namespace: monitoring
labels:
app: jaeger
jaeger-infra: collector-deployment
spec:
replicas: 1
View jaeger-agent-sidecar.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-deployment
namespace: default
labels:
app: myapp
spec:
replicas: 3
selector:
View grpc_server_tracing.go
package grpc_server
import (
"github.com/opentracing/opentracing-go"
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/grpc-ecosystem/go-grpc-middleware"
"google.golang.org/grpc"
"github.com/masroorhasan/myapp/tracer"
)
View jaeger_tracer_client.go
package tracer
import (
"io"
"github.com/uber/jaeger-client-go/config"
jprom "github.com/uber/jaeger-lib/metrics/prometheus"
)
func NewTracer() (opentracing.Tracer, io.Closer, error) {
View jaeger-agent-ds.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-deployment
namespace: default
labels:
app: myapp
spec:
replicas: 3
selector:
You can’t perform that action at this time.