Skip to content

Commit

Permalink
Set up restrict length rules for service, instance and endpoint (apac…
Browse files Browse the repository at this point in the history
…he#4633)

* Set up restrict length rules for service, instance and endpoint

* Adjust two env names.
  • Loading branch information
wu-sheng authored Apr 10, 2020
1 parent 6fe2041 commit 44cae97
Show file tree
Hide file tree
Showing 36 changed files with 414 additions and 589 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,18 @@ public void addRule(String name, String ruleRegex) {
public FormatResult format(String string) {
for (PatternRule rule : rules) {
if (rule.getPattern().matcher(string).matches()) {
return new FormatResult(true, rule.getName());
return new FormatResult(true, rule.getName(), string);
}
}
return new FormatResult(false, string);
return new FormatResult(false, string, string);
}

@Getter
@RequiredArgsConstructor
public static class FormatResult {
private final boolean match;
private final String name;
private final String replacedName;
}

@Getter
Expand Down
2 changes: 1 addition & 1 deletion apm-dist-es7/src/main/assembly/binary-es7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
<outputDirectory>/config</outputDirectory>
<includes>
<include>log4j2.xml</include>
<include>application.yml</include>
<include>alarm-settings.yml</include>
<include>alarm-settings-sample.yml</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-bootstrap/src/main/resources</directory>
<includes>
<include>application.yml</include>
<include>component-libraries.yml</include>
<include>official_analysis.oal</include>
<include>gateways.yml</include>
Expand Down
2 changes: 1 addition & 1 deletion apm-dist/src/main/assembly/binary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
<outputDirectory>/config</outputDirectory>
<includes>
<include>log4j2.xml</include>
<include>application.yml</include>
<include>alarm-settings.yml</include>
<include>alarm-settings-sample.yml</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-bootstrap/src/main/resources</directory>
<includes>
<include>application.yml</include>
<include>component-libraries.yml</include>
<include>official_analysis.oal</include>
<include>gateways.yml</include>
Expand Down
277 changes: 0 additions & 277 deletions dist-material/application.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/en/setup/backend/backend-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ storage:
# other configurations
```

1. **`core`** is the module.
1. **`storage`** is the module.
1. **`selector`** selects one out of the all providers listed below, the unselected ones take no effect as if they were deleted.
1. **`default`** is the default implementor of core module.
1. `driver`, `url`, ... `metadataQueryMaxSize` are all setting items of the implementor.
Expand Down
4 changes: 2 additions & 2 deletions docs/en/setup/service-agent/java-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ This is the properties list supported in `agent/config/agent.config`.
property key | Description | Default |
----------- | ---------- | --------- |
`agent.namespace` | Namespace isolates headers in cross process propagation. The HEADER name will be `HeaderName:Namespace`. | Not set |
`agent.service_name` | Application(5.x)/Service(6.x) code is showed in sky-walking-ui. Suggestion: set a unique name for each service, service instance nodes share the same code, Max length is 50(UTF-8 char) | `Your_ApplicationName` |
`agent.service_name` | The service name to represent a logic group providing the same capabilities/logic. Suggestion: set a unique name for every logic service group, service instance nodes share the same code, Max length is 50(UTF-8 char) | `Your_ApplicationName` |
`agent.sample_n_per_3_secs`|Negative or zero means off, by default.SAMPLE_N_PER_3_SECS means sampling N TraceSegment in 3 seconds tops.|Not set|
`agent.authentication`|Authentication active is based on backend setting, see application.yml for more details.For most scenarios, this needs backend extensions, only basic match auth provided in default implementation.|Not set|
`agent.span_limit_per_segment`|The max number of spans in a single segment. Through this config item, SkyWalking keep your application memory cost estimated.|300 |
`agent.ignore_suffix`|If the operation name of the first span is included in this set, this segment should be ignored.|Not set|
`agent.is_open_debugging_class`|If true, skywalking agent will save all instrumented classes files in `/debugging` folder. SkyWalking team may ask for these files in order to resolve compatible problem.|Not set|
`agent.instance_name` |Instance name is the identity of an instance, should be unique in the service. If empty, SkyWalking agent will generate an 32-bit uuid. Default rule is `ServiceName` + UUID`@`hostname` as the instance name. Max length is 50(UTF-8 char)|`""`|
`agent.instance_name` |Instance name is the identity of an instance, should be unique in the service. If empty, SkyWalking agent will generate an 32-bit uuid. Default, use `UUID`@`hostname` as the instance name. Max length is 50(UTF-8 char)|`""`|
`agent.instance_properties[key]=value` | Add service instance custom properties. | Not set|
`agent.cause_exception_depth`|How depth the agent goes, when log all cause exceptions.|`5`|
`agent.force_reconnection_period `|Force reconnection period of grpc, based on grpc_channel_check_interval.|`1`|
Expand Down
1 change: 0 additions & 1 deletion oap-server/server-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@
<exclude>log4j2.xml</exclude>
<exclude>alarm-settings.yml</exclude>
<exclude>component-libraries.yml</exclude>
<exclude>endpoint_naming_rules.properties</exclude>
<exclude>official_analysis.oal</exclude>
<exclude>gateways.yml</exclude>
<exclude>service-apdex-threshold.yml</exclude>
Expand Down
Loading

0 comments on commit 44cae97

Please sign in to comment.