Skip to content

Commit

Permalink
adjust: doc and test
Browse files Browse the repository at this point in the history
  • Loading branch information
observeralone committed Jan 20, 2023
1 parent 44affe5 commit b85673a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Obs. for a more complete [frontend/backend](./Examples/aspnetcore/) example.

## Community

* [Github Issues](https://github.com/megaease/easeagent-sdk-php/issues)
* [Github Issues](https://github.com/megaease/easeagent-sdk-net/issues)
* [Join Slack Workspace](https://join.slack.com/t/openmegaease/shared_invite/zt-upo7v306-lYPHvVwKnvwlqR0Zl2vveA) for requirement, issue and development.
* [MegaEase on Twitter](https://twitter.com/megaease)

Expand Down
6 changes: 3 additions & 3 deletions Tests/T_Spec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Load()
{
string path = getBasePath("agent_test_normal.yml");
Spec spec = Spec.Load(path);
Assert.AreEqual("demo.demo.sdk-php-router-service", spec.ServiceName);
Assert.AreEqual("demo.demo.sdk-net-router-service", spec.ServiceName);
Assert.AreEqual("log-tracing", spec.TracingType);
Assert.AreEqual(true, spec.TracingEnable);
Assert.AreEqual(0.5, spec.SampleRate);
Expand All @@ -63,10 +63,10 @@ public void Load()
Assert.AreEqual("----------- cert -----------\ncert content\n----------- cert end -----------\n", spec.TlsCert);

spec = Spec.Load(getBasePath("agent_test_empty_tls.yml"));
Assert.AreEqual("demo.demo.sdk-php-router-service", spec.ServiceName);
Assert.AreEqual("demo.demo.sdk-net-router-service", spec.ServiceName);

spec = Spec.Load(getBasePath("agent_test_just_service_name.yml"));
Assert.AreEqual("demo.demo.sdk-php-router-service", spec.ServiceName);
Assert.AreEqual("demo.demo.sdk-net-router-service", spec.ServiceName);
Assert.AreEqual("log-tracing", spec.TracingType);
Assert.AreEqual(true, spec.TracingEnable);
Assert.AreEqual(1.0, spec.SampleRate);
Expand Down
2 changes: 1 addition & 1 deletion Tests/agent_test_empty_tls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
serviceName: demo.demo.sdk-php-router-service
serviceName: demo.demo.sdk-net-router-service
tracing.type: log-tracing
tracing.enable: true
tracing.sample.rate: 0.5
Expand Down
2 changes: 1 addition & 1 deletion Tests/agent_test_just_service_name.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
serviceName: demo.demo.sdk-php-router-service
serviceName: demo.demo.sdk-net-router-service
2 changes: 1 addition & 1 deletion Tests/agent_test_normal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
serviceName: demo.demo.sdk-php-router-service
serviceName: demo.demo.sdk-net-router-service
tracing.type: log-tracing
tracing.enable: true
tracing.sample.rate: 0.5
Expand Down
4 changes: 2 additions & 2 deletions doc/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $ dotnet add package easeagent --version 0.0.1

## Usage
### First: Configuration
create a yaml file config for your server like this: [agent.yml](./agent.yml)
create a yaml file config for your server like this: [agent.yml](https://github.com/megaease/easeagent-sdk-net/blob/main/doc/agent.yml)

If you are using `MegaEase Cloud`. Please download the agent.yml on the front end. `YOUR_SERVCIE_NAME`,`TYPE_OF_TRACING`,`MEGAEASE_CLOUD_URL` and `TLS` will be filled in for you automatically.

Expand Down Expand Up @@ -73,7 +73,7 @@ trace.Record(Annotations.ServerSend());
trace.Record(Annotations.Tag("http.url", "<url>")); //adds binary annotation
```

We provide an interface so that you can decorate the Span of the middleware, please refer to another [document](./megaease-cloud-config.md) for the reason of decoration.
We provide an interface so that you can decorate the Span of the middleware, please refer to another [document](https://github.com/megaease/easeagent-sdk-net/blob/main/doc/megaease-cloud-config.md) for the reason of decoration.
```csharp
// decorate a span to rabbitmq
Agent.RecordMiddleware(trace, easeagent.Middleware.Type.RabbitMQ);
Expand Down
2 changes: 1 addition & 1 deletion doc/megaease-cloud-config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MegaEase Cloud Configuration

Modify the [agent.yml](./agent.yml) file to configure your information.
Modify the [agent.yml](https://github.com/megaease/easeagent-sdk-net/blob/main/doc/agent.yml) file to configure your information.

## 1. Name

Expand Down

0 comments on commit b85673a

Please sign in to comment.