Skip to content

Commit befcebd

Browse files
authored
Adding development container config (#559)
* Adding VSCode and dev container conifg * Cleaned up typos
1 parent 4de50a5 commit befcebd

File tree

6 files changed

+83
-8
lines changed

6 files changed

+83
-8
lines changed

.devcontainer/devcontainer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/java
3+
{
4+
"name": "Java",
5+
"image": "mcr.microsoft.com/devcontainers/java:8",
6+
7+
"features": {
8+
"ghcr.io/devcontainers/features/java:1": {
9+
"version": "none",
10+
"installMaven": "true",
11+
"mavenVersion": "3.8.6",
12+
"installGradle": "false"
13+
},
14+
"ghcr.io/devcontainers/features/docker-in-docker:2": { // Needed for Testcontainers for Java
15+
"disableIp6tables": true
16+
}
17+
},
18+
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
"settings": {},
24+
"extensions": [
25+
"streetsidesoftware.code-spell-checker"
26+
]
27+
}
28+
}
29+
30+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
31+
// "forwardPorts": [],
32+
33+
// Use 'postCreateCommand' to run commands after the container is created.
34+
// "postCreateCommand": "java -version",
35+
36+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
37+
// "remoteUser": "root"
38+
}

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ target/*
1010
.settings/
1111
/target
1212
.idea
13-
.vscode
1413
*.iml
1514
*.ucls
1615

@@ -19,5 +18,5 @@ target/*
1918
# jenv
2019
.java_version
2120
.java-version
22-
21+
!.vscode
2322
.env

.vscode/settings.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "disabled",
3+
"java.format.settings.url": "style.xml",
4+
"java.debug.settings.onBuildFailureProceed": true,
5+
"cSpell.words": [
6+
"adoptopenjdk",
7+
"barbarfoo",
8+
"barbarfoobar",
9+
"confd",
10+
"confs",
11+
"fofofofofo",
12+
"foofoo",
13+
"hamcrest",
14+
"jasperserver",
15+
"javadocs",
16+
"jmxchecknoprefix",
17+
"jmxfetch",
18+
"jmxremote",
19+
"jmxrmi",
20+
"jmxtree",
21+
"jndi",
22+
"JVMS",
23+
"keyspace",
24+
"mbean",
25+
"minibuff",
26+
"NADA",
27+
"nonblocking",
28+
"openj9",
29+
"openmbean",
30+
"pqrst",
31+
"reinit",
32+
"statsd",
33+
"temurin",
34+
"thisis",
35+
"thisiscounter",
36+
"uripath"
37+
],
38+
}

src/main/java/org/datadog/jmxfetch/AttachApiConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private JMXServiceURL getAddress(Map<String, Object> connectionParams)
2929
try {
3030
address = new JMXServiceURL(getJmxUrlForProcessRegex(processRegex));
3131
} catch (com.sun.tools.attach.AttachNotSupportedException e) {
32-
throw new IOException("Unnable to attach to process regex: " + processRegex, e);
32+
throw new IOException("Unable to attach to process regex: " + processRegex, e);
3333
}
3434
return address;
3535
}

src/main/java/org/datadog/jmxfetch/Instance.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ private InstanceTelemetry registerTelemetryBean(InstanceTelemetry bean) {
276276

277277
try {
278278
mbs.registerMBean(bean,instanceTelemetryBeanName);
279-
log.debug("Succesfully registered jmx bean for instance {} with ObjectName = {}",
279+
log.debug("Successfully registered jmx bean for instance {} with ObjectName = {}",
280280
this.getName(), instanceTelemetryBeanName);
281281
} catch (InstanceAlreadyExistsException
282282
| MBeanRegistrationException
@@ -534,7 +534,7 @@ public List<Metric> getMetrics() throws IOException {
534534
return metrics;
535535
}
536536

537-
/** Returns whather or not the given period has elapsed since reference time. */
537+
/** Returns whether or not the given period has elapsed since reference time. */
538538
public boolean isPeriodDue(long refTime, Integer refPeriod) {
539539
if ((System.currentTimeMillis() - refTime) / 1000 < refPeriod) {
540540
return false;
@@ -543,7 +543,7 @@ public boolean isPeriodDue(long refTime, Integer refPeriod) {
543543
}
544544
}
545545

546-
/** Returns whather or not its time to collect metrics for the instance. */
546+
/** Returns whether or not its time to collect metrics for the instance. */
547547
public boolean timeToCollect() {
548548
if (this.minCollectionPeriod == null) {
549549
return true;
@@ -870,7 +870,7 @@ public void cleanUp() {
870870
}
871871

872872
/**
873-
* Asynchronoush cleanup of instance, including connection.
873+
* Asynchronous cleanup of instance, including connection.
874874
* */
875875
public synchronized void cleanUpAsync() {
876876
cleanupTelemetryBean();

src/main/java/org/datadog/jmxfetch/JmxAttribute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private List<String> getBeanParametersList(
196196
}
197197

198198
/**
199-
* Wrapper for javax.management.ObjectName.unqoute that removes quotes from the bean parameter
199+
* Wrapper for javax.management.ObjectName.unquote that removes quotes from the bean parameter
200200
* value if possible. If not, it hits the catch block and returns the original parameter.
201201
*/
202202
private String unquote(String beanParameter) {

0 commit comments

Comments
 (0)