Skip to content

Commit

Permalink
Merge branch 'file_s3' of github.com:wenxuwan/layotto into file_s3
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxuwan committed Jun 9, 2022
2 parents 6110732 + f0867be commit f179c77
Show file tree
Hide file tree
Showing 37 changed files with 1,189 additions and 146 deletions.
3 changes: 2 additions & 1 deletion cmd/layotto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ import (
_ "mosn.io/layotto/pkg/wasm"

_ "mosn.io/layotto/diagnostics/exporter_iml"
"mosn.io/layotto/diagnostics/jaeger"
lprotocol "mosn.io/layotto/diagnostics/protocol"
lsky "mosn.io/layotto/diagnostics/skywalking"

Expand Down Expand Up @@ -521,7 +522,7 @@ func ExtensionsRegister(_ *cli.Context) {
trace.RegisterTracerBuilder("SOFATracer", protocol.HTTP1, tracehttp.NewTracer)
trace.RegisterTracerBuilder("SOFATracer", lprotocol.Layotto, diagnostics.NewTracer)
trace.RegisterTracerBuilder(skywalking.SkyDriverName, lprotocol.Layotto, lsky.NewGrpcSkyTracer)

trace.RegisterTracerBuilder("Jaeger", lprotocol.Layotto, jaeger.NewGrpcJaegerTracer)
}

func main() {
Expand Down
2 changes: 2 additions & 0 deletions cmd/layotto_multiple_api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ import (
"mosn.io/layotto/pkg/runtime"

_ "mosn.io/layotto/diagnostics/exporter_iml"
"mosn.io/layotto/diagnostics/jaeger"
lprotocol "mosn.io/layotto/diagnostics/protocol"
lsky "mosn.io/layotto/diagnostics/skywalking"
)
Expand Down Expand Up @@ -526,6 +527,7 @@ func ExtensionsRegister(_ *cli.Context) {
trace.RegisterTracerBuilder("SOFATracer", protocol.HTTP1, tracehttp.NewTracer)
trace.RegisterTracerBuilder("SOFATracer", "layotto", diagnostics.NewTracer)
trace.RegisterTracerBuilder(skywalking.SkyDriverName, lprotocol.Layotto, lsky.NewGrpcSkyTracer)
trace.RegisterTracerBuilder("Jaeger", lprotocol.Layotto, jaeger.NewGrpcJaegerTracer)

}

Expand Down
139 changes: 139 additions & 0 deletions configs/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"servers": [
{
"default_log_path": "stdout",
"default_log_level": "DEBUG",
"routers": [
{
"router_config_name": "actuator_dont_need_router"
}
],
"listeners": [
{
"name": "grpc",
"address": "0.0.0.0:34904",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "grpc",
"config": {
"server_name": "runtime",
"grpc_config": {
"hellos": {
"quick_start_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"state": {
"state_demo": {
"type": "in-memory",
"metadata": {
}
}
},
"lock": {
"lock_demo": {
"type": "in-memory",
"metadata": {
}
}
},
"pub_subs": {
"pub_subs_demo": {
"type": "in-memory",
"metadata": {
"consumerID": "1"
}
}
},
"sequencer": {
"sequencer_demo": {
"type": "in-memory",
"metadata": {}
}
},
"secret_store": {
"secret_demo": {
"type": "local.env",
"metadata": {
}
}
},
"bindings": {
"bindings_demo": {
"type": "http",
"metadata": {
"url": "https://mosn.io/layotto"
}
}
},
"custom_component": {
"helloworld": {
"demo": {
"type": "in-memory",
"metadata": {}
}
}
},
"app": {
"app_id": "app1",
"grpc_callback_port": 9999
}
}
}
}
]
}
]
},
{
"name": "actuator",
"address": "127.0.0.1:34999",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"upstream_protocol": "Http1",
"router_config_name": "actuator_dont_need_router"
}
}
]
}
],
"stream_filters": [
{
"type": "actuator_filter"
}
]
}
]
}
],
"tracing": {
"enable": true,
"driver": "SOFATracer",
"config": {
"generator": "mosntracing",
"exporter": [
"stdout"
]
}
},
"metrics": {
"sinks": [
{
"type": "prometheus",
"config": {
"port": 34903
}
}
]
}
}
86 changes: 86 additions & 0 deletions configs/config_trace_jaeger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"servers": [
{
"default_log_path": "stdout",
"default_log_level": "INFO",
"listeners": [
{
"name": "grpc",
"address": "0.0.0.0:34904",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "grpc",
"config": {
"server_name": "runtime",
"grpc_config": {
"hellos": {
"quick_start_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"config_store": {
"config_demo": {
"type": "etcd",
"address": [
"127.0.0.1:2379"
],
"timeout": "10"
}
}
}
}
}
]
}
],
"stream_filters": [
{
"type": "flowControlFilter",
"config": {
"global_switch": true,
"limit_key_type": "PATH",
"rules": [
{
"resource": "/spec.proto.runtime.v1.Runtime/SayHello",
"grade": 1,
"threshold": 5
}
]
}
},
{
"type": "grpc_metric"
}
]
}
]
}
],
"tracing": {
"enable": true,
"driver": "jaeger",
"config": {
"config": {
"service_name": "layotto",
"strategy": "collector"
}
}
},
"metrics": {
"sinks": [
{
"type": "prometheus",
"config": {
"port": 34903
}
}
]
}
}



Loading

0 comments on commit f179c77

Please sign in to comment.